hi DS,
here is the code snippet i'm using:
X509 *cert;
FILE fp;
fp=fopen("cacert.der","r");
/* error check*/
cert=d2i_X509_fp(fp,NULL);
/* error check*/
printf("Valid From : %d",X509_get_notBefore(cert));
/*gives 13 and when printed using %s, it gives segmentation fault*/
actually, the call X509_get_notBefore() is a macro defined in ssl.h as
#define X509_get_notBefore(x) ((x)->cert_info->validity->notBefore)
and the data type of the member 'notBefore' is ASN1_TIME . am i doing something wrong and do u have any idea that how can i parse and print the date elements?
thanx and regards,
-Vipin
Yahoo! Mail
Use Photomail to share photos without annoying attachments.