sometimes we should save RSA key in pure binary form (ie, no base64 or similar) in a char* variable and load/save the key from/to it. This way I have much more freedom: I'll be able to store the key directly into the application const char key[] { 0x01, 0x02, ... };, send it over a network socket, etc.
Use d2i_RSAPrivateKey to load directly from a buffer containing binary DER format:
const unsigned char *p = key;
RSA *r = d2i_RSAPrivateKey(NULL, &p, keylen)
This function work well,I think it can be add in RSAKeyImpl.h as a overload function.





