>>"Hellan,Kim KHE" wrote:
>>
>> I need to duplicate an EVP_PKEY. Is that possible?
>> There is an X509_dup(), but there is no EVP_PKEY_dup().
>>
>Ooops, I forgot about that.
I guess this means that this function will be in later versions of OpenSSL
:-)
>Alternatively you do something like...
>> But anyway.
>> Do you have any suggestions, how to properly implement the RSA_dup()
>> function you suggested earlier, assuming that we are only talking
software
>> keys?
>Well it depends on what you want to actually do. If you have an EVP_PKEY
>structure and you want to be able to pass i
"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);
>
We
>>
>> 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
"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);
> >> re