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]

Reply via email to