summaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2017-02-16 16:08:02 -0500
committerRichard Levitte <levitte@openssl.org>2017-05-02 10:38:54 +0200
commit20ee2bf138323c6688b6e8d71d695cf2bd53f857 (patch)
tree2b648a3a5c8d1c62ab9607166691db7f5397db14 /test/recipes
parentee6b68ce4c67870f9323d2a380eb949f447c56ee (diff)
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)
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/90-test_time_offset.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/recipes/90-test_time_offset.t b/test/recipes/90-test_time_offset.t
new file mode 100644
index 0000000000..a032d9b40a
--- /dev/null
+++ b/test/recipes/90-test_time_offset.t
@@ -0,0 +1,12 @@
+#! /usr/bin/env perl
+# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+
+use OpenSSL::Test::Simple;
+
+simple_test("test_time_offset", "time_offset_test");