On Wed, Nov 07, 2012, Graham Leggett wrote: > Hi all, > > I would like to know how long a CRL has until it expires in seconds (or milli > or microseconds, don't care, I can convert), and am struggling to find a > formally supported way to do this. > > What I would like to do is return the difference between a given ASN1_TIME > and the current time, or two ASN1_TIME values (don't care which, I can > generate an ASN1_TIME from the current time). > > Does openssl offer a function to do this, or will I be forced to write my own? >
There isn't currently a function to do this but there is a commented out (and largely untested) function in crypto/asn1/a_time.c to convert an ASN1_TIME structure to a struct tm and a function to diff two tm structures called OPENSSL_gmtime_diff. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org