Re: Load key from char[] into RSA structure

2007-02-14 Thread Dr. Stephen Henson
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 gen

Re: Load key from char[] into RSA structure

2007-02-14 Thread Thomas Hecker
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.pu

Re: Load key from char[] into RSA structure

2007-02-14 Thread Patrick Patterson
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