On Mon, Jan 11, 2010, rale77 wrote:

> 
> Hello, 
> 
> How can I remove RSA structure form EVP_PKEY previosly added to EPP_PKEY
> with EVP_PKEY_assign_RSA function? I have one RSA object named rsa  and
> EVP_PKEY object named evp and their relation is : 
> rsa = evp->pkey.rsa 
> How to remove their bound and then delete EVP_PKEY (with EVP_PKEY_free(evp)) 
> without deleting rsa. 
> 

If you use EVP_PKET_set1_RSA() instead of EVP_PKEY_assign_RSA() the reference
count of the added RSA structure is incremented and you can free up the
EVP_PKEY structure later without freeing up the reference RSA structure.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to