Rafa Marín López wrote:
> Hello, all.
Hello,

> I have executed this instruction:
> 
> char keystr[1024];
> 
> RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
> 
> i2d_RSAPublicKey(rsa,&(keystr));

&keystr is a I/O parameter, pointing past the DER coded key.

You must use something like:

char *ptr = keystr;
len = i2d_RSAPublicKey(rsa,&ptr);

then the DER coded key is in keystr and
prt is keystr + len;

By

Goetz

-- 
Goetz Babin-Ebell, TC TrustCenter GmbH, http://www.trustcenter.de
Sonninstr. 24-28, 20097 Hamburg, Germany
Tel.: +49-(0)40 80 80 26 -0,  Fax: +49-(0)40 80 80 26 -126
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to