Introduce ASN1_TIME_set_string_X509 API
authorRich Salz <rsalz@openssl.org>
Sun, 11 Jun 2017 20:36:07 +0000 (16:36 -0400)
committerRich Salz <rsalz@openssl.org>
Sun, 11 Jun 2017 20:36:07 +0000 (16:36 -0400)
commit04e62715db684d83bffac53793ff4cfac51e047a
treeb286fb5cda68811e59d3bc5779cec8b9ff2e14ed
parent7aefa75490991d71e190be38457223704fefff34
Introduce ASN1_TIME_set_string_X509 API

Make funcs to deal with non-null-term'd string
in both asn1_generalizedtime_to_tm() and asn1_utctime_to_tm().

Fixes issue #3444.

This one is used to enforce strict format (RFC 5280) check and to
convert GeneralizedTime to UTCTime.

apps/ca has been changed to use the new API.

Test cases and documentation are updated/added

Signed-off-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3566)
apps/apps.c
apps/ca.c
crypto/asn1/a_gentm.c
crypto/asn1/a_time.c
crypto/asn1/a_utctm.c
doc/man3/ASN1_TIME_set.pod
include/openssl/asn1.h
test/time_offset_test.c
test/x509_time_test.c
util/libcrypto.num