Fix time offset calculation.
authorTodd Short <tshort@akamai.com>
Thu, 16 Feb 2017 21:08:02 +0000 (16:08 -0500)
committerRichard Levitte <levitte@openssl.org>
Tue, 2 May 2017 08:38:54 +0000 (10:38 +0200)
commit20ee2bf138323c6688b6e8d71d695cf2bd53f857
tree2b648a3a5c8d1c62ab9607166691db7f5397db14
parentee6b68ce4c67870f9323d2a380eb949f447c56ee
Fix time offset calculation.

ASN1_GENERALIZEDTIME and ASN1_UTCTIME may be specified using offsets,
even though that's not supported within certificates.

To convert the offset time back to GMT, the offsets are supposed to be
subtracted, not added. e.g. 1759-0500 == 2359+0100 == 2259Z.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2654)
crypto/asn1/a_gentm.c
crypto/asn1/a_utctm.c
test/build.info
test/recipes/90-test_time_offset.t [new file with mode: 0644]
test/time_offset_test.c [new file with mode: 0644]