summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2015-10-19 16:29:23 +0000
committerBob Beck <beck@cvs.openbsd.org>2015-10-19 16:29:23 +0000
commitb5136537b9cd399ff363e0ef0356185ebc3296e2 (patch)
tree027715f730bc9453dc04dd4703e73f1236951de5
parent07428663aec8681ce37c4a1dd8eef51f1767a451 (diff)
Change regress to not believe legacy times are valid
-rw-r--r--regress/lib/libcrypto/asn1/asn1time.c69
1 files changed, 4 insertions, 65 deletions
diff --git a/regress/lib/libcrypto/asn1/asn1time.c b/regress/lib/libcrypto/asn1/asn1time.c
index b6875c5f373..6c938087f1a 100644
--- a/regress/lib/libcrypto/asn1/asn1time.c
+++ b/regress/lib/libcrypto/asn1/asn1time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1time.c,v 1.3 2015/10/02 15:35:30 jsing Exp $ */
+/* $OpenBSD: asn1time.c,v 1.4 2015/10/19 16:29:22 beck Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
*
@@ -89,57 +89,16 @@ struct asn1_time_test asn1_gentime_tests[] = {
0x5a,
},
},
- {
- .str = "20150923032700.22-0700",
- .data = "20150923102700Z",
- .time = 1443004020,
- .der = {
- 0x18, 0x16, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
- 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x30, 0x30,
- 0x2e, 0x32, 0x32, 0x2d, 0x30, 0x37, 0x30, 0x30,
- },
- },
- {
- .str = "20150923032712+1100",
- .data = "20150922162712Z",
- .time = 1442939232,
- .der = {
- 0x18, 0x13, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
- 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x31, 0x32,
- 0x2b, 0x31, 0x31, 0x30, 0x30,
- },
- },
- {
- .str = "20150923032712+1115",
- .data = "20150922161212Z",
- .time = 1442938332,
- .der = {
- 0x18, 0x13, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
- 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x31, 0x32,
- 0x2b, 0x31, 0x31, 0x31, 0x35,
- },
- },
- {
- .str = "20150923032700.12345678Z",
- .data = "20150923032700Z",
- .time = 1442978820,
- .der = {
- 0x18, 0x18, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
- 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x30, 0x30,
- 0x2e, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x5a,
- },
- },
};
struct asn1_time_test asn1_utctime_tests[] = {
{
- .str = "7001010000Z",
+ .str = "700101000000Z",
.data = "700101000000Z",
.time = 0,
.der = {
- 0x17, 0x0b, 0x37, 0x30, 0x30, 0x31, 0x30, 0x31,
- 0x30, 0x30, 0x30, 0x30, 0x5a,
+ 0x17, 0x0d, 0x37, 0x30, 0x30, 0x31, 0x30, 0x31,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
},
},
{
@@ -152,26 +111,6 @@ struct asn1_time_test asn1_utctime_tests[] = {
},
},
{
- .str = "150923032700-0700",
- .data = "150923102700Z",
- .time = 1443004020,
- .der = {
- 0x17, 0x11, 0x31, 0x35, 0x30, 0x39, 0x32, 0x33,
- 0x30, 0x33, 0x32, 0x37, 0x30, 0x30, 0x2d, 0x30,
- 0x37, 0x30, 0x30,
- },
- },
- {
- .str = "150923032712+1100",
- .data = "150922162712Z",
- .time = 1442939232,
- .der = {
- 0x17, 0x11, 0x31, 0x35, 0x30, 0x39, 0x32, 0x33,
- 0x30, 0x33, 0x32, 0x37, 0x31, 0x32, 0x2b, 0x31,
- 0x31, 0x30, 0x30,
- },
- },
- {
.str = "140524144512Z",
.data = "140524144512Z",
.time = 1400942712,