Randall Ward wrote:
> 
> Thanks for such a fast reply. I think that I'm still missing something about
> the parameters to PEM_read_PrivateKey and the callback.
> 
> Based on what I learned from a posting from a few days ago, I am calling
> PEM_read_PrivateKey(fp, x, cb, u) where the parameters are:
> fp: file pointer
> x:  pointer for in object, leasve it NULL
> cb: callback for passphrase (only needed for private key)
> u:  parameter passed to callback
> 
> and I am segmenting on (i think) u. What is u supposed to be? I've looked in
> the pem.h and pem_lib.c files, but they get really complicated really fast.
> 

'u's meaning is left up to the callback. It could be a prompt phrase a
window handle or ignored. It was added because there was a need to send
info to the callback.

There is an additional case though. In OpenSSL 0.9.5a if the callback is
0 and the parameter is not NULL then it is interpreted as a null
terminated passphrase. If the parameter is NULL then the passphrase is
prompted for in the usual way.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to