Consolidate to a single asn1_time_from_tm() function
authorTodd Short <tshort@akamai.com>
Fri, 4 Aug 2017 01:24:03 +0000 (11:24 +1000)
committerPauli <paul.dale@oracle.com>
Fri, 4 Aug 2017 01:24:03 +0000 (11:24 +1000)
commitcf37aaa335965902c6a022bc3c3e0162f59c0f3a
treeb00a60fd9a70836f4d97478432cd4d9ddaae73fa
parent2326bba0e5cbe98f4d00855a6909b1f14b6f5427
Consolidate to a single asn1_time_from_tm() function

Add missing ASN1_TIME functions

Do some cleanup of the ASN1_TIME code.
Add ASN1_TIME_normalize() to normalize ASN1_TIME structures.
Add ASN1_TIME_compare() to compare two ASN1_TIME structures.
Add ASN1_TIME_cmp_time_t() to compare an ASN1_TIME to time_t
(generic version of ASN1_UTCTIME_cmp_time_t()).

Replace '0' .. '9' compares with isdigit()

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2753)
12 files changed:
crypto/asn1/a_gentm.c
crypto/asn1/a_object.c
crypto/asn1/a_time.c
crypto/asn1/a_utctm.c
crypto/asn1/asn1_locl.h
doc/man3/ASN1_TIME_set.pod
include/openssl/asn1.h
test/asn1_time_test.c [new file with mode: 0644]
test/build.info
test/recipes/90-test_asn1_time.t [new file with mode: 0644]
test/time_offset_test.c
util/libcrypto.num