"Hellan,Kim KHE" wrote:
> 
> 
>
> 
> Well... actually there is no RSA_dup() either :-)...... but the following
> should works as well:
> ....
> EVP_PKEY* pDupKey = EVP_PKEY_new();
> RSA* pRSA = EVP_PKEY_get1_RSA(pKey);
> EVP_PKEY_set1_RSA(pDupKey, pRSA);
> RSA_free(pRSA);
> return(pDupKey);
> 

Well that will just end up with two distinct EVP_PKEY structures
referencing the same 'rsa' structure with an upped reference count. If
you're going to do that then you might as well just up the reference
count of the EVP_PKEY structure.

Now I've looked at it RSA_dup() is a non trivial problem when it deals
with things like hardware keys.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

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

Reply via email to