[openssl-users] How to access some simple conversion functions - asn1_time_to_tm
Nounou Dadoun
nounou.dadoun at avigilon.com
Tue Jan 19 01:28:30 UTC 2016
That actually worked reasonably smoothly, the only thing that I have to fix now is that it's obviously taking the time zone into account - is there a way of telling it to do everything in UTC?
And I still don't see any programmatic way of accessing whether a key usage is "critical" or not.
Thanks .... N
Nou Dadoun
Senior Firmware Developer, Security Specialist
Office: 604.629.5182 ext 2632
Support: 888.281.5182 | avigilon.com
Follow Twitter | Follow LinkedIn
-----Original Message-----
From: openssl-users [mailto:openssl-users-bounces at openssl.org] On Behalf Of Dr. Stephen Henson
Sent: Monday, January 18, 2016 2:51 PM
To: openssl-users at openssl.org
Subject: Re: [openssl-users] How to access some simple conversion functions - asn1_time_to_tm
On Mon, Jan 18, 2016, Nounou Dadoun wrote:
> 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).
>
The equivalent of time_t is easier. If you use the function ASN1_TIME_diff you can find the difference in days and seconds between two ASN1_TIME structures so if you set one to the epoch you can then convert the result to time_t.
You have to be careful the result doesn't overflow the local time_t.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org _______________________________________________
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
More information about the openssl-users
mailing list