On Thu, Apr 07, 2011 at 04:50:19PM +0000, Lou Picciano wrote:
> Friends, I must admit we've never had to do it before - Can we query
> the expiration date directly from a certificate, perhaps by using the
> ASN structure code? (Is there a map of the currently-vailable structure
> codes, as used by OpenSSL?)
Look at apps/x509.c. Specifically how "openssl x509 -dates" is implemented.
else if (startdate == i)
{
BIO_puts(STDout,"notBefore=");
ASN1_TIME_print(STDout,X509_get_notBefore(x));
BIO_puts(STDout,"\n");
}
else if (enddate == i)
{
BIO_puts(STDout,"notAfter=");
ASN1_TIME_print(STDout,X509_get_notAfter(x));
BIO_puts(STDout,"\n");
}
--
Viktor.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]