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 <[EMAIL PROTECTED]>
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           [EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/please-help-me.....-tf3975055.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                           [EMAIL PROTECTED]

Reply via email to