Hi,
You can achieve the same by following these steps :
- Call the function "PEM_read_X509" to obtain an "X509" pointer from
the certificate file.
- Call the function "X509_get_pubkey" on this pointer to obtain an
"EVP_PKEY" pointer.
- Call the function "PEM_write_PUBKEY" on this pointer to save the
public key to a file.
Regards,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr
Vincent CLUZAUD wrote:
Dear users,
I want to extract public key from certificate (*.cer file) in C++
(with visual C++).
In command, I can do that with this command : c:\OpenSSL\bin\openssl
x509 -inform pem -in certificate.cer -pubkey -noout > publickey.pem
Could you telle how to do that in C++?
Thanks in advanced,
Vincent
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org