diff options
| author | beck <> | 2022-11-08 12:56:00 +0000 |
|---|---|---|
| committer | beck <> | 2022-11-08 12:56:00 +0000 |
| commit | 9f56389a0b2fbecb7632dfc7aec5de47fe155958 (patch) | |
| tree | 6afc424706c2c9c83e686d335838e684e3a74fa2 /src/lib/libcrypto/asn1/a_time.c | |
| parent | 86e54e486dbdfb8be0d480062369c10447e345c1 (diff) | |
| download | openbsd-9f56389a0b2fbecb7632dfc7aec5de47fe155958.tar.gz openbsd-9f56389a0b2fbecb7632dfc7aec5de47fe155958.tar.bz2 openbsd-9f56389a0b2fbecb7632dfc7aec5de47fe155958.zip | |
Replace the old OpenSSL julian date stuff with BoringSSL's
OpenSSL dealt with time conversion using a classical julian
day scheme. BoringSSL got rid of it and uses only a julian
style calculation for seconds since the POSIX time epoch.
This changes libressl to use the seconds calculation exculusively
instead of a mix of the julian day based conversions and the
system time conversions to and from time_t to tm.
ok tb@ jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/a_time.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c index 03311e1b7f..a951b32049 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.34 2022/06/27 13:54:57 beck Exp $ */ | 1 | /* $OpenBSD: a_time.c,v 1.35 2022/11/08 12:56:00 beck 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 | * |
| @@ -67,7 +67,6 @@ | |||
| 67 | #include <openssl/asn1t.h> | 67 | #include <openssl/asn1t.h> |
| 68 | #include <openssl/err.h> | 68 | #include <openssl/err.h> |
| 69 | 69 | ||
| 70 | #include "o_time.h" | ||
| 71 | #include "asn1_locl.h" | 70 | #include "asn1_locl.h" |
| 72 | 71 | ||
| 73 | const ASN1_ITEM ASN1_TIME_it = { | 72 | const ASN1_ITEM ASN1_TIME_it = { |
| @@ -103,7 +102,7 @@ ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm) | |||
| 103 | time(&now); | 102 | time(&now); |
| 104 | memset(tm, 0, sizeof(*tm)); | 103 | memset(tm, 0, sizeof(*tm)); |
| 105 | 104 | ||
| 106 | return gmtime_r(&now, tm) != NULL; | 105 | return asn1_time_time_t_to_tm(&now, tm); |
| 107 | } | 106 | } |
| 108 | 107 | ||
| 109 | int | 108 | int |
