[openssl-users] How to access some simple conversion functions - asn1_time_to_tm

Nounou Dadoun nounou.dadoun at avigilon.com
Mon Jan 18 20:42:31 UTC 2016


Hi folks,

I'm trying to do some simple conversions (I need to push some certificate data across a soap interface).

I'm trying to do an ASN1 time conversion to tm (and eventually time_t but tm would be fine).

Earlier mailing list entries said that this was not available but I've now found:
https://github.com/openssl/openssl/blob/master/crypto/asn1/a_time.c  which contains asn1_time_to_tm 
which also refers to 
https://github.com/openssl/openssl/blob/master/crypto/asn1/a_gentm.c  for asn1_generalizedtime_to_tm 

I could just copy and paste them but no sense in duplicating the wheel if there's a header file which exposes them, is there one?  Which releases of openssl have them?


The other conversions I need to do are key usage (I have a first cut at this) and extended key usage as a usage string and critical (boolean) flag; any similar openssl apis to retrieve those? Or pointers to sample code?

Thanks in advance for any pointers . N


Nou Dadoun
Senior Firmware Developer, Security Specialist


Office: 604.629.5182 ext 2632 
Support: 888.281.5182  |  avigilon.com
Follow Twitter  |  Follow LinkedIn


This email, including any files attached hereto (the "email"), contains privileged and confidential information and is only for the intended addressee(s). If this email has been sent to you in error, such sending does not constitute waiver of privilege and we request that you kindly delete the email and notify the sender. Any unauthorized use or disclosure of this email is prohibited. Avigilon and certain other trade names used herein are the registered and/or unregistered trademarks of Avigilon Corporation and/or its affiliates in Canada and other jurisdictions worldwide.




More information about the openssl-users mailing list