diff options
author | beck <> | 2024-04-08 19:57:40 +0000 |
---|---|---|
committer | beck <> | 2024-04-08 19:57:40 +0000 |
commit | 9b894dc1e52d28085c180c2a2584f86b2cc867e0 (patch) | |
tree | 619c34426de3801d9a839cd449bde5dac9c734e7 /src/regress/lib/libcrypto/asn1/rfc5280time.c | |
parent | 7c47e205b5035b62d024838e10da7aa8d6858336 (diff) | |
download | openbsd-9b894dc1e52d28085c180c2a2584f86b2cc867e0.tar.gz openbsd-9b894dc1e52d28085c180c2a2584f86b2cc867e0.tar.bz2 openbsd-9b894dc1e52d28085c180c2a2584f86b2cc867e0.zip |
Make ASN1_TIME_set_string_X509 and ASN1_TIME_set_string match the man page
This makes it where people can't put dumb values in certs without
trying harder, and changes the regress to test this.
GENERALIZED times outside of the RFC5280 spec are required for OCSP
but these should be constructed with the GENERALIZED time string
setters.
ok tb@
Diffstat (limited to 'src/regress/lib/libcrypto/asn1/rfc5280time.c')
-rw-r--r-- | src/regress/lib/libcrypto/asn1/rfc5280time.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/regress/lib/libcrypto/asn1/rfc5280time.c b/src/regress/lib/libcrypto/asn1/rfc5280time.c index 7a44a30e88..c57cac1463 100644 --- a/src/regress/lib/libcrypto/asn1/rfc5280time.c +++ b/src/regress/lib/libcrypto/asn1/rfc5280time.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rfc5280time.c,v 1.7 2022/09/05 21:12:08 tb Exp $ */ | 1 | /* $OpenBSD: rfc5280time.c,v 1.8 2024/04/08 19:57:40 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2015 Bob Beck <beck@opebsd.org> | 4 | * Copyright (c) 2015 Bob Beck <beck@opebsd.org> |
@@ -234,13 +234,6 @@ rfc5280_invtime_test(int test_no, struct rfc5280_time_test *att) | |||
234 | goto done; | 234 | goto done; |
235 | } | 235 | } |
236 | } | 236 | } |
237 | if (ASN1_TIME_set_string(t, att->str) != 0) { | ||
238 | if (X509_cmp_time(t, &now) != 0) { | ||
239 | fprintf(stderr, "FAIL: test %d - successfully parsed as UTCTIME " | ||
240 | "string '%s'\n", test_no, att->str); | ||
241 | goto done; | ||
242 | } | ||
243 | } | ||
244 | 237 | ||
245 | failure = 0; | 238 | failure = 0; |
246 | 239 | ||