Take a look at the function PEM_ASN1_read_bio
in pem_lib.c, and more specially at the lines
if (!PEM_get_EVP_CIPHER_INFO(header,&cipher)) goto err;
if (!PEM_do_header(&cipher,data,&len,cb)) goto err;
The first line intitializes the cipher from a PEM header like yours.
The second line will decrypt the data with the cipher initialized with
a key derived from the pasword returned by the callback cb function.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, June 16, 1999 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: Key generation for DES
>
>
> Hi there!
>
> I would like to use X509 certificates generated by ssleay/openssl within
> a Java application I am writing. Of course the corresponding private keys
> should be encrypted. Now my problem is how do I get the right DES key from
> the information stored in the private key file and the users pass phrase.
> Here is the DEK-Info from my certificate:
>
> DEK-Info: DES-CBC,53AC0D14DD32D368
>
> How do I generate a DES key from these bytes and the pass phrase.
> Is there some documentation available?
>
> Thanks in advance,
>
> Harald.
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> Development Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]