Hi,

I am trying to read in a DER encoded RSA public key using d2i_X509_fp();

I have generated an RSA key using openssl with the following commands:

1. openssl genrsa -out privkey.pem 2048
2. openssl rsa -pubout -in privkey.pem -out pubkey.der -outform der

In my C++ program, I coded the following:
FILE *fp = fopen("pubkey.der", "rb");
X509 *x = d2i_X509_fp(fp, NULL);

However, x returns NULL after this point. How do I get a valid X509
structure from a DER encoded cert?
-- 
View this message in context: 
http://old.nabble.com/reading-DER-encoded-RSA-cert-file-tp30186760p30186760.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to