diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time_tm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c index d729af5f65..c13b9b5064 100644 --- a/src/lib/libcrypto/asn1/a_time_tm.c +++ b/src/lib/libcrypto/asn1/a_time_tm.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_time_tm.c,v 1.40 2024/05/03 18:22:26 tb Exp $ */ | 1 | /* $OpenBSD: a_time_tm.c,v 1.41 2024/05/03 18:29:43 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -325,6 +325,11 @@ ASN1_TIME_set_string_internal(ASN1_TIME *s, const char *str, int mode) | |||
| 325 | 325 | ||
| 326 | if (ASN1_time_parse(str, strlen(str), &tm, mode) == -1) | 326 | if (ASN1_time_parse(str, strlen(str), &tm, mode) == -1) |
| 327 | return 0; | 327 | return 0; |
| 328 | |||
| 329 | /* Only check str's format, as documented. */ | ||
| 330 | if (s == NULL) | ||
| 331 | return 1; | ||
| 332 | |||
| 328 | switch (mode) { | 333 | switch (mode) { |
| 329 | case V_ASN1_UTCTIME: | 334 | case V_ASN1_UTCTIME: |
| 330 | return tm_to_utctime(&tm, s); | 335 | return tm_to_utctime(&tm, s); |
