You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
RSA key pair generation worked fine previously and it is still working fine with win build of OpenSSL 3.0 .
However on mac below code doesn't work
This is for saving public key and not working:
BIO* pub = BIO_new(BIO_s_mem());
i2d_PUBKEY_bio(pub, pkey);
int pub_len = BIO_pending(pub);
ACUns8 pub_key[8192];
BIO_read(pub, pub_key, pub_len);
if i don't use bio in below code i am successfully able to get public key
unsigned char* pub_key = NULL;
int pub_len = 0;
pub_len = i2d_PUBKEY(pkey, &pub_key);
Below code works fine for private key
// 3. save private key
BIO* pri = BIO_new(BIO_s_mem());
int pri_len = BIO_pending(pri);
ACUns8 pri_key[8192];
ACUns8* ptr = &pri_key[0];
pri_len = i2d_PrivateKey(pkey, NULL);
i2d_PrivateKey(pkey, &ptr);
Beta Was this translation helpful? Give feedback.
All reactions