How to set "e" in RSA structure ?
Swamy J-S
swamy.j-s at in.abb.com
Wed Jul 10 09:51:01 UTC 2019
Recently i upgraded openssl from 1.0.2 to 1.1.0. As RSA structure is opaque in new opnessl i made some modifications in my code as follows :
Old Code
RSA* rsa = EVP_PKEY_get1_RSA(PKey);
if(NULL != rsa)
{
if(!BN_set_word(rsa->e, 65537) || !EVP_PKEY_set1_RSA(PKey, rsa))
--------------------------------------------------------------------------------------------------
New Code
RSA* rsa = EVP_PKEY_get1_RSA(PKey);
BIGNUM *e_new = BN_new();
if(NULL != rsa)
{
if(!BN_set_word(e_new, 65537) || !EVP_PKEY_set1_RSA(PKey, rsa))
But Now "e" variable is not set in 'rsa', So how to set "e" inside rsa? Pls suggest me corresponding API
Thanks and Regards,
SWAMY J S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20190710/e5665ac3/attachment.html>
More information about the openssl-users
mailing list