On Wed, Jan 08, 2003 at 09:40:58AM -0800, Fisk, Kevin wrote:
> Okay.  Right now, I call SSL_CTX_use_PrivateKey_file with the parameter
> SSL_FILETYPE_PEM.  What do I pass for the type PK (first parameter) to
> pass this.  Do I need to convert the PEM file before it can be passed as
> an ASN.1 certificate?  I tried only passing the private key portion as a
> string, the entire thing as a string, and I tried using
> SSL_CTX_use_RSAPrivateKey_ASN1 with both strings.

ASN1 (in OpenSSL also referred to as DER format) is a binary representation
in ASN.1 format. PEM is the base64 encoded DER format. You can use the
  int PEM_read(FILE *fp, char **name, char **header, unsigned char **data,
               long *len)
or PEM_read_bio() routines. Please refer to the "pem" manual page.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
http://www.aet.TU-Cottbus.DE/personen/jaenicke/
BTU Cottbus, Allgemeine Elektrotechnik
Universitaetsplatz 3-4, D-03044 Cottbus
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to