On Tue, Nov 06, 2007, John T. Cox wrote:

> Nevermind,
> 
> Upon further review I realized I need to just NOT use load_key().
> 
> I probably need to use something like PEM_reas_bio_RSAPrivateKey().
> 
> I assume I can replace pem_password_cb *cb with my password function which
> returns a char *?
> 
> 

PEM_read_bio_PrivateKey() is preferred since that doesn't tie you to one key
type.

You can use a callback but as the fine manual says if you pass 0 as the
callback you can pass a null terminated password in the final argument.

See:

http://www.openssl.org/docs/crypto/pem.html#PEM_FUNCTION_ARGUMENTS

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to