Hi,

Tried the given function, it compiles but throws error "Run-Time Check
Failure #3 - The variable 'rsa' is being used without being defined.". Any
clue?? And the char * buf contains the key right??

Thanks & Regards
Shalmi

Marek Marcola wrote:
>
> Hello,
>> ok i l try that.let me know u ......

>
> You may try something like that (not tested):
>
> int rsa_read_pem(RSA ** rsa, char *buf, int len)
> {
> BIO *mem;
>
> if ((mem = BIO_new_mem_buf(buf, len)) == NULL) {
> goto err;
> }
>
> *rsa = PEM_read_bio_RSAPrivateKey(mem, NULL, NULL, NULL);
> BIO_free(mem);
>
> if (*rsa == NULL) {
> goto err;
> }
>
> return (0);
>
> err:
> return (-1);
> }
>
> Best regards,
> --
> Marek Marcola
>
> __________________________________________________ ____________________
> OpenSSL Project http://www.openssl.org
> User Support Mailing List openssl-users@openssl.org
> Automated List Manager majordomo@openssl.org
>
>


--
View this message in context: http://www.nabble.com/please-help-me...html#a13384524
Sent from the OpenSSL - User mailing list archive at Nabble.com.

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org