Thank you Steve. It works fine.
Have a nice day. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dr. Stephen Henson Sent: Tuesday, November 14, 2006 6:44 PM To: openssl-users@openssl.org Subject: Re: Any API available to get the CRL next update time in ASN1_GENERALIZEDTIME? On Tue, Nov 14, 2006, [EMAIL PROTECTED] wrote: > > Hi Team, > > I found the following API to get the time ASN1_GENERALIZEDTIME format. > ====================================================== > ASN1_TIME *ctm = NULL; > ASN1_GENERALIZEDTIME *asn1_time = NULL; > > ctm = M_ASN1_TIME_dup (X509_CRL_get_nextUpdate(base_crl)); > asn1_time = M_ASN1_GENERALIZEDTIME_dup(ctm); > > printf ("The CRL's NEXT UPDATE TIME in ASN1_GENERALIZEDTIME format: > %s", asn1_time->data); > ======================================================= > Result of this code is: > The CRL's NEXT UPDATE TIME in ASN1_GENERALIZEDTIME format: > [061117082334Z] > ======================================================== > > The time I am seeing is: 061117082334Z. > Can I interpret that time like : 2006 Nov 17 08:23:34 ?. But how do I > convert like this? > > How do i convert the 061117082334Z to 2006 Nov 17 08:23:34 ?. > > Appreciate your thouights on the same. Thanks a lot. > That is not GeneralizedTime format and those macros should not be used in applications. If you want to convert an ASN1_TIME to GeneralizedTime then the function ASN1_TIME_to_generalizedtime() will do it. If you want to print the result in human readable form then ASN1_TIME_print() will do the trick. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]