Thanks for pointing me in the right direction. I am only using RSA for this
implementation. So, using those routines, keeps things simpler. I believe
what I have now should. But, my read is returning a NULL.

char keyfile[] = "/path/file"
char *pass = get_pass()

pkey = BIO_new_file(keyfile, "rb")
rsa = PEM_read_bio_RSAPrivateKey(pkey, NULL, 0, pass)

pkey is not NULL and appears to contain valid data. rsa is NULL. Anyone have
any thoughts or can recommend how to debug this type of problem?

Thanks,

On 11/6/07, Dr. Stephen Henson <[EMAIL PROTECTED]> wrote:

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



-- 
==============================================================================
                                John T. Cox
                          e-mail [EMAIL PROTECTED]
                    www http://members.iglou.com/vampire
==============================================================================

Reply via email to