> '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.

I do nothing with u yet... I'm just hard-coding the passphrase till I can
get something to work.

> 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.

If I understand you correctly, if I call:

PEM_read_PrivateKey(open_key_file, NULL, NULL, "passphrase");

then the string "passphrase" would be taken as just that & there would be no
need to define a callback function. However, this does not work for me. It
seems that no matter what I try I core dump right as I try to read the
private key file.

I did a little tinkering around & found that I hit an access violation at
the line

        for (;;)
                {
                if (!PEM_read_bio(bp,&nm,&header,&data,&len))

in the function char *PEM_ASN1_read_bio(char *(*d2i)(), ... ) in pem_lib.c. 

This occurs after I call PEM_read_PrivateKey ( open_key_file, NULL, cb,
<anything>). I know that the file pointer is good, the cb looks fine in the
debugger, and I'm not touching that last parameter anywhere.


Thanks again!
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to