diff options
author | beck <> | 2022-06-30 08:41:01 +0000 |
---|---|---|
committer | beck <> | 2022-06-30 08:41:01 +0000 |
commit | af12e5f1f61c20ed0d631df45e132df5daea4057 (patch) | |
tree | ef4b06bc9fb57e5c7aeffd54fd28cd1fa8c3c551 /src | |
parent | e739e7135a34bf40c24a1e1e30017dc20fabd066 (diff) | |
download | openbsd-af12e5f1f61c20ed0d631df45e132df5daea4057.tar.gz openbsd-af12e5f1f61c20ed0d631df45e132df5daea4057.tar.bz2 openbsd-af12e5f1f61c20ed0d631df45e132df5daea4057.zip |
add valid utc time that should fail to parse as generalized
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/asn1/asn1time.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1time.c b/src/regress/lib/libcrypto/asn1/asn1time.c index 2bcf3d69ca..ca54087dd7 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.11 2022/06/30 08:32:26 beck Exp $ */ | 1 | /* $OpenBSD: asn1time.c,v 1.12 2022/06/30 08:41:01 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -77,6 +77,10 @@ struct asn1_time_test asn1_invgentime_tests[] = { | |||
77 | { | 77 | { |
78 | .str = "201612081934Z", | 78 | .str = "201612081934Z", |
79 | }, | 79 | }, |
80 | /* Valid UTC time, should fail as a generalized time */ | ||
81 | { | ||
82 | .str = "160908234300Z", | ||
83 | }, | ||
80 | }; | 84 | }; |
81 | 85 | ||
82 | struct asn1_time_test asn1_goodtime_tests[] = { | 86 | struct asn1_time_test asn1_goodtime_tests[] = { |
@@ -473,7 +477,7 @@ main(int argc, char **argv) | |||
473 | fprintf(stderr, "Invalid generalized time tests...\n"); | 477 | fprintf(stderr, "Invalid generalized time tests...\n"); |
474 | for (i = 0; i < N_INVGENTIME_TESTS; i++) { | 478 | for (i = 0; i < N_INVGENTIME_TESTS; i++) { |
475 | att = &asn1_invgentime_tests[i]; | 479 | att = &asn1_invgentime_tests[i]; |
476 | failed |= asn1_invtime_test(i, att, 0); | 480 | failed |= asn1_invtime_test(i, att, 1); |
477 | } | 481 | } |
478 | 482 | ||
479 | fprintf(stderr, "GENERALIZEDTIME tests...\n"); | 483 | fprintf(stderr, "GENERALIZEDTIME tests...\n"); |