Hello,
> I tried the PEM_read_RSAPrivateKey and PEM_read_RSAPublicKey pair. 
> PEM_read_RSAPrivateKey seems work fine. 
> PEM_read_RSAPublicKey failed. 
> By tracing, it failed in BIO_gets(), returning 0. Any idea?
PEM_read_RSAPublicKey reads from PKCS#1 ASN1 structure public
part of RSA key (n,e).
Input data to PEM_read_RSAPrivateKey() and PEM_read_RSAPublicKey()
should have the same form (and not X509 certificate).
I do not now if you want to read "public part of RSA key" or
certificate (with public key too :-).
If you want read certificate - PEM_read_X509 is proper solution.

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to