diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time_tm.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c index c13b9b5064..a1f329be96 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.41 2024/05/03 18:29:43 tb Exp $ */ | 1 | /* $OpenBSD: a_time_tm.c,v 1.42 2024/05/03 18:33:27 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -88,9 +88,6 @@ tm_to_gentime(struct tm *tm, ASN1_TIME *atime) | |||
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | if (atime == NULL) | ||
| 92 | return 1; | ||
| 93 | |||
| 94 | if (asprintf(&time_str, "%04u%02u%02u%02u%02u%02uZ", tm->tm_year + 1900, | 91 | if (asprintf(&time_str, "%04u%02u%02u%02u%02u%02uZ", tm->tm_year + 1900, |
| 95 | tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, | 92 | tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, |
| 96 | tm->tm_sec) == -1) { | 93 | tm->tm_sec) == -1) { |
| @@ -117,9 +114,6 @@ tm_to_utctime(struct tm *tm, ASN1_TIME *atime) | |||
| 117 | return 0; | 114 | return 0; |
| 118 | } | 115 | } |
| 119 | 116 | ||
| 120 | if (atime == NULL) | ||
| 121 | return 1; | ||
| 122 | |||
| 123 | if (asprintf(&time_str, "%02u%02u%02u%02u%02u%02uZ", | 117 | if (asprintf(&time_str, "%02u%02u%02u%02u%02u%02uZ", |
| 124 | tm->tm_year % 100, tm->tm_mon + 1, tm->tm_mday, | 118 | tm->tm_year % 100, tm->tm_mon + 1, tm->tm_mday, |
| 125 | tm->tm_hour, tm->tm_min, tm->tm_sec) == -1) { | 119 | tm->tm_hour, tm->tm_min, tm->tm_sec) == -1) { |
