Hi, I have another problem now, I want to convert a pkcs#1 to a pkcs#8 using the openssl function. I noticed that there is a "PEM_write_PKCS8PrivateKey()", but I believe it produces a pkcs#1 public key, so how do i get a pkcs8 public key?
thanks! On 6/27/07, Dr. Stephen Henson <[EMAIL PROTECTED]> wrote:
On Wed, Jun 27, 2007, Janet N wrote: > Hi, > > Is there a function in openssl that can convert a private key from a pkcs#8 > to pkcs#1? I've done this with the command line and it works fine, just > want to do this programmatically: > > command line (want to do this using openssl function instead): > openssl pkcs8 -inform PEM -nocrypt -in dsakey.pem -out new.pem Well PEM_read_PrivateKey() will automatically handle multiple formats including PKCS#8. If you write using PEM_write_PrivateKey() it will use PKCS#1. 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]