cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ASN1 (DER) key does not work

From: Seshubabu Pasam <pasam_at_seshubabu.com>
Date: Thu, 15 Apr 2004 18:27:16 -0700

> This is interesting, perhaps you are using an old version of OpenSSL? From
> the OpenSSL man page:
>
> SSL_CTX_use_PrivateKey_file() adds the first private key found in file to
> ctx. The formatting type of the certificate must be specified from the known
> types SSL_FILETYPE_PEM, SSL_FILETYPE_ASN1. SSL_CTX_use_RSAPrivateKey_file()
> adds the first private RSA key found in file to ctx.
> SSL_use_PrivateKey_file() adds the first private key found in file to ssl;
> SSL_use_RSAPrivateKey_file() adds the first private RSA key found to ssl.
>
> That certainly makes it sound like it supports ASN1.

That code snippet was from openssl-0.9.7c. I downloaded the latest
(openssl-0.9.7d) and checked the function again. It does not support
ASN1, which means curl can only support PEM formatted private key, as
long as it uses this function.

OpenSSL man page is certainly mis-leading in this case.

Regards
-Seshubabu Pasam
Received on 2004-04-16