From: beck Date: Mon, 19 Oct 2015 16:29:22 +0000 (+0000) Subject: Change regress to not believe legacy times are valid X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6c4452d773b30121aed24b46b8ff56a3ace30b2c;p=openbsd Change regress to not believe legacy times are valid --- 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 * @@ -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, }, }, { @@ -151,26 +110,6 @@ struct asn1_time_test asn1_utctime_tests[] = { 0x30, 0x33, 0x32, 0x37, 0x30, 0x30, 0x5a, }, }, - { - .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",