hi all,
i need to fetch the thumbprint of the X509 cert. and for this i'm using X509_digest(). but it is throwing a segmentation fault. any idea how to fix this.....
this is the code i'm using...
void print_thubprint(X509 *cert)
{
const EVP_MD *md=NULL;
unsigned char *buf=NULL;
unsigned int len=0;
//md=EVP_get_digestbyname("SHA1");
/////////////////or
//md=EVP_sha1();
//both did not help....
return=X509_digest(cert,md,buf,&len); //throws SIGSEGV
....
//code to access buf [ ]
....
}
and the gdb output at this line shows:
"Program received signal SIGSEGV, segmentation fault
0x402215ed in SHA1_Final() from
/usr/lib/libcrypto.so.0.9.7"
.........do i need to call EVP_init(),update(),final() explicitly???
Thanks in advance,
-vipin
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.