summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/a_time.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c
index 6e4f1a8065..79bcbffa26 100644
--- a/src/lib/libcrypto/asn1/a_time.c
+++ b/src/lib/libcrypto/asn1/a_time.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time.c,v 1.31 2021/11/03 13:44:15 tb Exp $ */ 1/* $OpenBSD: a_time.c,v 1.32 2021/11/06 07:52:22 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -80,7 +80,6 @@ const ASN1_ITEM ASN1_TIME_it = {
80 .sname = "ASN1_TIME", 80 .sname = "ASN1_TIME",
81}; 81};
82 82
83
84ASN1_TIME * 83ASN1_TIME *
85d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len) 84d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len)
86{ 85{
@@ -124,12 +123,12 @@ ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm)
124int 123int
125ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to) 124ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to)
126{ 125{
127 struct tm tm_from, tm_to; 126 struct tm tm_from, tm_to;
128 127
129 if (!ASN1_TIME_to_tm(from, &tm_from)) 128 if (!ASN1_TIME_to_tm(from, &tm_from))
130 return 0; 129 return 0;
131 if (!ASN1_TIME_to_tm(to, &tm_to)) 130 if (!ASN1_TIME_to_tm(to, &tm_to))
132 return 0; 131 return 0;
133 132
134 return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to); 133 return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to);
135} 134}