ok i l try that.let me know u ...... Marek Marcola <[EMAIL PROTECTED]> wrote: Hello, > i tried that way, now its generating coredump files.is there any other > way to solve that issue.......
You should use something like that (buf and len has your key): unsigned char *p; RSA *rsa = NULL; p = buf; if ((rsa=d2i_RSAPrivateKey(NULL,&p,(long)len)) == NULL){ goto err; } if (SSL_CTX_use_RSAPrivateKey(ctx,rsa) != 1){ goto err; } RSA_free(rsa); But you should be sure that buf has DER (ASN.1) PKCS1 private key. If you dump this buffer to file, you should be able to do something like that: $ openssl rsa -in key.der -inform der -text -noout $ openssl asn1parse -in key.der -inform der If you will get error then probably you have pem format, you may try to convert with: $ openssl rsa -in key.pem -outform der -out key.der and try again. Best regards, -- Marek Marcola ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] --------------------------------- The DELETE button on Yahoo! Mail is unhappy. Know why?