Hi Juan Pablo Rojas:

Thanks for your answer!
I've seen than SSL_get_privatekey also uses a CERT structure to store the
key.SSL_CTX is inside SSL, so I think that in fact they "point" to the same
key.
My problem is that I keep a pointer to the SSL_CTX struct used at startup,
where there is no already a SSL struct from a connection to retrieve the key
from.
So, although I�m not sure, I think I�ll use ctx->cert->key->privatekey.


>Hi Pablo!
>    The only way i've found to get it is using the SSL_get_privatekey from
the
>SSL structure.
>    I haven't found any way of doing it from SSL_CTX.
>    I hope this helps you.
>
>
>"Pablo J. Royo" wrote:
>
>> Hello all:
>>
>> I need to get the private key I loaded when my server started.Once a
client
>> connects I need server�s private key again and then all I have is a
SSL_CTX.
>> I used SSL_CTX_use_RSAPrivateKey_file( ) at startup so I know the key
must
>> be there in struct SSL_CTX , but looking at sources I haven�t found it. I
>> have seen something named CERT which seems to keep an array of
>> cert/privatekey pair.What it is for?
>> It is a SSL_CTX_get_PrivateKey( ) interface or something to get the key?
>>
>> Thanks.


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

Reply via email to