sending RSA public/private keys into calling function
I am newbie to openssl...
My calling application will accept only strings and interger.
we are replacing RSA bsafe library to openssl. using RSA bsafe, we have generated the private and public key in BER format. Then convert the keys, BER format into ASCII format to send the calling function. (these everything done by using RSA supplied bsafe library)
same way i have to right using openssl..i m now able convert the RSA public and private key into DER format
rsa = RSA_generate_key(1024, 3, NULL, NULL);
unsigned char *iend, *keybuf;
size = i2d_RSAPublicKey(rsa, NULL);
keybuf = (unsigned char *) malloc(size * sizeof( unsigned
iend = keybuf;
size = i2d_RSAPublicKey(rsa, &iend);
/* size returns the size of public key in bytes */
1. is it possible to convert this DER format into ASCII?
2. I am able to print the keybuf value into stdout in the as mentioned below
key : 30818702818100BAEF6AB1AD2503FFDC900B612BA2BCED9AF74E337A43B21D1FF69A30651AD7A492C1E199CB40A9DF693
is it possible to convert the key into DER format again?
if i use %c instead %X it is printing some junk..is it right?
oÓÍÈu^ÅYÌ9eP¿>±§ëùüÓ@3nJâp%}ùK8sY*ÿ àï ÚOåû\
Thanks in advance,
|All times are GMT -5. The time now is 05:25 AM.|