On Mon, 13 Dec 1999, Dr Stephen Henson wrote:
> Erwann ABALEA wrote:
> >
> > Could I suggest to add this in the default .h files?:
> >
> > #define d2i_PrivateKey_bio(bp,x) (EVP_PKEY *)ASN1_d2i_bio(\
> > (char *(*)())EVP_PKEY_new, (char *(*)())d2i_PrivateKey, bp, \
> > (unsigned char **)x)
> >
> > I wanted to be able to save my private keys in DER format, and read them
> > later... I didn't find the macro/function to do it... Unfortunately, my
> > definition doesn't handle encrypted keys...
> >
>
> One minor problem... d2i_PrivateKey doesn't exist!
>
> DER encoded private keys are a bit of a problem because you can't
> automatically tell the format (unlike PEM keys where you can read the
> header lines). This means you have to know the format in advance so
> you'd need separate versions for RSA, DSA, PKCS#8 unencrypted and PKCS#8
> encryped.
But it works for me! The d2i_PrivateKey function exists, at least in the
0.9.4 version...
For DER encoded keys, I have to know in advance the format of the key
(RSAPrivateKey or PKCS#8), but that's not a problem (I don't like idiot
users working with security... ;-) ).
--
Erwann ABALEA
System and Development Engineer - Certplus SA
[EMAIL PROTECTED]
- RSA PGP Key ID: 0x2D0EABD5 -
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]