summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2015-10-19 16:29:22 +0000
committerbeck <>2015-10-19 16:29:22 +0000
commit72f238d6c9f2c670520af9c52a336dfeccdefcdb (patch)
tree8587c048365bbccabd4e9d221cf97b3acb7a05f5 /src
parent587c883683d8c98265b9a91fcf9a9e0da684a734 (diff)
downloadopenbsd-72f238d6c9f2c670520af9c52a336dfeccdefcdb.tar.gz
openbsd-72f238d6c9f2c670520af9c52a336dfeccdefcdb.tar.bz2
openbsd-72f238d6c9f2c670520af9c52a336dfeccdefcdb.zip
Change regress to not believe legacy times are valid
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/asn1/asn1time.c69
1 files changed, 4 insertions, 65 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1time.c b/src/regress/lib/libcrypto/asn1/asn1time.c
index b6875c5f37..6c938087f1 100644
--- a/src/regress/lib/libcrypto/asn1/asn1time.c
+++ b/src/regress/lib/libcrypto/asn1/asn1time.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1time.c,v 1.3 2015/10/02 15:35:30 jsing Exp $ */ 1/* $OpenBSD: asn1time.c,v 1.4 2015/10/19 16:29:22 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -89,57 +89,16 @@ struct asn1_time_test asn1_gentime_tests[] = {
89 0x5a, 89 0x5a,
90 }, 90 },
91 }, 91 },
92 {
93 .str = "20150923032700.22-0700",
94 .data = "20150923102700Z",
95 .time = 1443004020,
96 .der = {
97 0x18, 0x16, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
98 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x30, 0x30,
99 0x2e, 0x32, 0x32, 0x2d, 0x30, 0x37, 0x30, 0x30,
100 },
101 },
102 {
103 .str = "20150923032712+1100",
104 .data = "20150922162712Z",
105 .time = 1442939232,
106 .der = {
107 0x18, 0x13, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
108 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x31, 0x32,
109 0x2b, 0x31, 0x31, 0x30, 0x30,
110 },
111 },
112 {
113 .str = "20150923032712+1115",
114 .data = "20150922161212Z",
115 .time = 1442938332,
116 .der = {
117 0x18, 0x13, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
118 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x31, 0x32,
119 0x2b, 0x31, 0x31, 0x31, 0x35,
120 },
121 },
122 {
123 .str = "20150923032700.12345678Z",
124 .data = "20150923032700Z",
125 .time = 1442978820,
126 .der = {
127 0x18, 0x18, 0x32, 0x30, 0x31, 0x35, 0x30, 0x39,
128 0x32, 0x33, 0x30, 0x33, 0x32, 0x37, 0x30, 0x30,
129 0x2e, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
130 0x38, 0x5a,
131 },
132 },
133}; 92};
134 93
135struct asn1_time_test asn1_utctime_tests[] = { 94struct asn1_time_test asn1_utctime_tests[] = {
136 { 95 {
137 .str = "7001010000Z", 96 .str = "700101000000Z",
138 .data = "700101000000Z", 97 .data = "700101000000Z",
139 .time = 0, 98 .time = 0,
140 .der = { 99 .der = {
141 0x17, 0x0b, 0x37, 0x30, 0x30, 0x31, 0x30, 0x31, 100 0x17, 0x0d, 0x37, 0x30, 0x30, 0x31, 0x30, 0x31,
142 0x30, 0x30, 0x30, 0x30, 0x5a, 101 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
143 }, 102 },
144 }, 103 },
145 { 104 {
@@ -152,26 +111,6 @@ struct asn1_time_test asn1_utctime_tests[] = {
152 }, 111 },
153 }, 112 },
154 { 113 {
155 .str = "150923032700-0700",
156 .data = "150923102700Z",
157 .time = 1443004020,
158 .der = {
159 0x17, 0x11, 0x31, 0x35, 0x30, 0x39, 0x32, 0x33,
160 0x30, 0x33, 0x32, 0x37, 0x30, 0x30, 0x2d, 0x30,
161 0x37, 0x30, 0x30,
162 },
163 },
164 {
165 .str = "150923032712+1100",
166 .data = "150922162712Z",
167 .time = 1442939232,
168 .der = {
169 0x17, 0x11, 0x31, 0x35, 0x30, 0x39, 0x32, 0x33,
170 0x30, 0x33, 0x32, 0x37, 0x31, 0x32, 0x2b, 0x31,
171 0x31, 0x30, 0x30,
172 },
173 },
174 {
175 .str = "140524144512Z", 114 .str = "140524144512Z",
176 .data = "140524144512Z", 115 .data = "140524144512Z",
177 .time = 1400942712, 116 .time = 1400942712,