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...

Thank you very much,
Thomas


On 14/02/07, Patrick Patterson <[EMAIL PROTECTED]> wrote:
On Wednesday 14 February 2007 12:30:00 you wrote:
> Hi,
>
> how can I load a public key from a char array into an RSA* stucture?
>
> char pubkey[] = "Xajztuaewfbfsg765tewaufe78...";
> The key does not have any PEM headers.
>
That all depends on what format the string is... if it is base64 encoded
(doesn't look like it is - the first few characters are wrong), then you
should just decode it into an unsigned char*, and use that (I think, it's
been a while, and I'm feeling lazy) in d2i_RSA_key().

If it is some other encoding, then I have no idea - it will all depend on what
the representation and the encoding of that string is.

--
Patrick Patterson
Chief PKI Architect,
Carillon Information Security Inc.
http://www.carillon.ca
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to