This question is likely to be a duplicate, I apologize if so, but cannot google a solution.
Given:
RSA* rsa = RSA_generate_key(2048, RSA_3, NULL, NULL);
I would like to have something like:
const char* pubKey = pubKeyFromRSA(rsa);
const char* privKey = privKeyFromRSA(rsa);
//and then convert it back
RSA* newRSA = RSAFromPrivKey(privKey);
How do I do that? Thanks