On Thu, Apr 10, 2008 at 11:44:23PM +0200, [EMAIL PROTECTED] wrote:

> Hello,
> 
> > On Thu, Apr 10, 2008 at 10:46:45PM +0200, [EMAIL PROTECTED] wrote:
> > 
> > > > I have converted that key to pem format with openssl commandline 
> tool 
> > > and
> > > > loaded with 
> > > > SSL_CTX_use_certificate_ASN1(ctx, len, (unsigned char*)in_buf)
> > > > It worked. 
> > > > 
> > > > Does anybody have any ideas what is wrong with 
> > > SSL_CTX_use_PrivateKey_ASN1 ?
> > > Try EVP_PKEY_RSA for RSA key instead of SSL_FILETYPE_ASN1.
> > 
> > Is the OP's file a private key or an X.509 certificate?
> Line:
>    fp = fopen("../keys/prkey.der", "r");
> suggest that this is private key.

The success of "SSL_CTX_use_certificate" seems to point to it being
a certificate. Which is it? Did the OP misreport what worked? Which
was it:

        SSL_CTX_use_PrivateKey_ASN1()
    OR
        SSL_CTX_use_certificate_ASN1()

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

Reply via email to