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?
Thanks in advance, for any help.
--
View this message in context:
http://old.nabble.com/Help-with-reading-DER-encoded-RSA-cert-file-tp30186539p30186539.html
Sent from the OpenSSL - Dev mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]