I decided to just pick apart the RSA key and stuff it manually into the OpenSSL RSA key structure.. Things work fine now. Thanks. -Jim Dr Stephen Henson wrote: > Jim Miller wrote: > > > > I am working on adapting our PKI toolkit to use OpenSSL. We of course > > have our own internal format for storing private keys. My problem is > > this, I export our private key in a ASN.1 DER encoded format and then > > try to "import" it with d2i_RSAPrivateKey(). No luck, the function is > > failing and returning a NULL. It is specifically dying within : > > > [example deleted] > > Hmmm... what format are you using for private keys? OpenSSL can handle > several different formats. > > d2i_RSAPrivateKey() is for use with PKCS#1 format. You may be using a > PKCS#8 PrivateKeyInfo structure which means you can use > d2i_PKCS8_PRIV_KEY_INFO(), the value returned can be converted into an > EVP_PKEY structure with EVP_PKCS82PKEY(). > > Other functions can handle encrypted PKCS#8 formats. > > Check out the pkcs8 application in apps/pkcs8.c for more info. > > Steve. > -- > Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/ > Personal Email: [EMAIL PROTECTED] > Senior crypto engineer, Celo Communications: http://www.celocom.com/ > Core developer of the OpenSSL project: http://www.openssl.org/ > Business Email: [EMAIL PROTECTED] PGP key: via homepage. > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > Development Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED]
begin:vcard n:Miller;Jim tel;cell:703-629-3236 tel;fax:703-421-2592 tel;work:703-421-1755 x-mozilla-html:TRUE url:www.entegrity.com org:Entegrity Solutions;Professional Services adr:;;2077 Gateway Place, Ste. 200;San Jose;CA;95110;US version:2.1 email;internet:[EMAIL PROTECTED] title:Security Architecture & Integration Team fn:Jim Miller end:vcard
