Re: ASN1_TIME to time_t

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

 



> From: openssl-users [mailto:openssl-users-bounces@xxxxxxxxxxx] On Behalf
> Of Dr. Stephen Henson
> Sent: Wednesday, September 06, 2017 10:26
> 
> No but there is a a round about way of achieving the same result. The
> ASN1_TIME_diff() function will determine the difference between two
> ASN1_TIME structures and return the result as a number of days and seconds.
> 
> So if you set one to the epoch time you can then calculate the time_t from
> the difference.

That's almost certainly a much better approach than the one I described in my previous email.

I assume ASN1_TIME_diff takes into account ASN.1 UTC Time versus Generalized Time, and timezone information. Though it wouldn't be hard to have a few different ASN1_TIME structures for the various permutations.

-- 
Michael Wojcik 
Distinguished Engineer, Micro Focus 



-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



[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