How to access some simple conversion functions - asn1_time_to_tm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux