[openssl-users] ASN1_TIME to time_t
Matt Caswell
matt at openssl.org
Wed Sep 6 08:23:26 UTC 2017
On 06/09/17 09:20, Dmitry Belyavsky wrote:
> Dear Matt,
>
> On Wed, Sep 6, 2017 at 11:16 AM, Matt Caswell <matt at openssl.org
> <mailto:matt at openssl.org>> wrote:
>
>
>
> On 06/09/17 09:12, Dmitry Belyavsky wrote:
> > Hello,
> >
> > Is there a way to convert ASN1_TIME to time_t or smth compatible? Quick
> > googling does not show good results.
>
> In master you can use ASN1_TIME_to_tm() which will give you a struct tm.
> Not available in released versions yet though.
>
>
> Is it implementable via API in 1.0.2?
Probably (not checked in detail), but you'd have to copy the
implementation into your code. See asn1_time_to_tm() in
crypto/asn1/a_time.c in master.
Matt
More information about the openssl-users
mailing list