SV: How to duplicate an EVP_PKEY..... Dr. Henson?

2001-03-28 Thread Hellan,Kim KHE
>>"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...

SV: How to duplicate an EVP_PKEY..... Dr. Henson?

2001-03-29 Thread Hellan,Kim KHE
>> 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

Re: SV: How to duplicate an EVP_PKEY..... Dr. Henson?

2001-03-28 Thread Dr S N Henson
"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

SV: SV: How to duplicate an EVP_PKEY..... Dr. Henson?

2001-03-28 Thread Hellan,Kim KHE
>> >> 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

Re: SV: SV: How to duplicate an EVP_PKEY..... Dr. Henson?

2001-03-28 Thread Dr S N Henson
"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