On Wed, Feb 14, 2007, Thomas Hecker wrote: > Hi, > > No, the key from my previous mail was just a demonstration..bad idea. > My original key is like this: > > char test_public_key_b64[] = > "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfwqtxpIfOjFgs6Y1G..." > > and I think it is base64 encoded. I generated the key with > $ openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM and > removed the plaintext-header. > > Where can I find any information about the d2i_RSA_key() function? > Even google doesn't know anything about it. Sorry, but I'm ssl > newbie... >
The function is d2i_RSA_PUBKEY() but you need to convert that string into binary form first. A better idea is to produce the key using the -outform DER switch and convert that to a C array using (for example) the xxd utility. Then you can feed it directly into d2i_RSA_PUBKEY(). Oh and check the FAQ for info about the use of d2i_*() functions. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]