hello
i have compiled openssl for red hat linux
im trying to sign the x509 certificate request
it is able to create the certificate but crashes when
trying to sign with public key.
im using /demos/maurice/loadkey.c for loading key from
the file privkey.pem,cert.pem that comes with openssl
distribution
im attaching the code ... has anybody as the solution
please reply
--------------------------------------------------------#include<stdio.h>
#include "loadkeys.c"
main()
{
EVP_PKEY *pubkey,*privkey;
X509_REQ *req;
EVP_MD *md;
/* create certificate request object */
req=X509_REQ_new();
if(req==NULL)
printf("\n unable to create request
object \n");
/* get the public key from the certificate*/
pubkey=ReadPublicKey("cert.pem");
/* set the public key */
X509_REQ_set_pubkey(req,pubkey);
/* set the name of request */
X509_REQ_set_version(req,0);
/* get the private key for signing */
privkey=ReadPublicKey("privkey.pem");
/* sign the request */
X509_REQ_sign(req,privkey,EVP_md5());
}
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.in address at http://mail.yahoo.co.in
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]