On Mon, 21 Jan 2002, Hellan,Kim KHE wrote:

> Hi
>
> I have an RSA private key in a EVP_PKEY structure.
> I need to get the RSA "blob" out of the EVP_PKEY, encrypt it
> (EVP_des_ede3_cbc) and Base64 encode it.
> Basically I need something like what the PEM_write_PrivateKey() function
> does, except my destination is memory, not a file and I don't want the PEM
> header/footer.
> I'm sure this can easily be done using the right OpenSSL function, but which
> one?

PEM_ASN1_write_bio() to memory-type BIO may fit

> And also.....at some point I need to put the encrypted, encoded RSA key back
> into an EVP_PKEY structure?

PEM_ASN1_read_bio()

good luck,
Vadim

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to