Alex, thanks for the responce. 

Here's a follow up question.

d2i_PublicKey has a type as the first parameter. What are they refereing
to? What do they want in this field?

Hylton


-----Original Message-----
From: Alexander Kuit [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2001 05:21
To: [EMAIL PROTECTED]
Subject: Re: RSA Keys



On 03.12.2001 11:39:54 owner-openssl-users wrote:

>Hi
>
>Sorry for the resend.
>This is a resend with the complete encoding type.
>
>
>I am getting a file from a MS machine that contains an exported public
>key. This data appears to be binary data. It has been exported with the
>flag X509_ASN_ENCODING
>
>Trying to read the file with PEM_read_publickkey() does not appear to
>work. What is the correct function or other method to use to get this
>data into a RSA * struct or a EVP_PKEY structure. Preferably EVP_PKEY
to
>add to a certificate.

PEM is the ascii version of the binary ASN/DER encoding, so PEM
functions
won't work. To convert a binary (der) encoding into an internal OpenSSL
structure, use the d2i_* functions. In your case, probably the
d2i_PublicKey()
or a similar function will do. See also the FAQ for more information
about the d2i_* functions.

Alex.

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

Reply via email to