diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time_tm.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c index 33959afe63..a1cc6f88b9 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.16 2020/12/16 18:35:59 tb Exp $ */ | 1 | /* $OpenBSD: a_time_tm.c,v 1.17 2020/12/16 18:46:29 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -353,7 +353,6 @@ ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, ASN1_GENERALIZEDTIME **out) | |||
| 353 | if (t->type != V_ASN1_GENERALIZEDTIME && t->type != V_ASN1_UTCTIME) | 353 | if (t->type != V_ASN1_GENERALIZEDTIME && t->type != V_ASN1_UTCTIME) |
| 354 | return (NULL); | 354 | return (NULL); |
| 355 | 355 | ||
| 356 | memset(&tm, 0, sizeof(tm)); | ||
| 357 | if (t->type != ASN1_time_parse(t->data, t->length, &tm, t->type)) | 356 | if (t->type != ASN1_time_parse(t->data, t->length, &tm, t->type)) |
| 358 | return (NULL); | 357 | return (NULL); |
| 359 | if ((str = gentime_string_from_tm(&tm)) == NULL) | 358 | if ((str = gentime_string_from_tm(&tm)) == NULL) |
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 59a8a1e5b6..88a7ef034d 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_verify.c,v 1.24 2020/11/18 17:54:46 tb Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.25 2020/12/16 18:46:29 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -604,8 +604,6 @@ x509_verify_asn1_time_to_tm(const ASN1_TIME *atime, struct tm *tm, int notafter) | |||
| 604 | { | 604 | { |
| 605 | int type; | 605 | int type; |
| 606 | 606 | ||
| 607 | memset(tm, 0, sizeof(*tm)); | ||
| 608 | |||
| 609 | type = ASN1_time_parse(atime->data, atime->length, tm, atime->type); | 607 | type = ASN1_time_parse(atime->data, atime->length, tm, atime->type); |
| 610 | if (type == -1) | 608 | if (type == -1) |
| 611 | return 0; | 609 | return 0; |
