diff options
author | tb <> | 2023-07-02 19:52:01 +0000 |
---|---|---|
committer | tb <> | 2023-07-02 19:52:01 +0000 |
commit | 1235f87e2cef60842de72797e55c7587df5ed283 (patch) | |
tree | c190ccba24689602c19b94da6de82eda0586db38 /src/lib/libcrypto | |
parent | ddcb4efd6551a982bf29b2e8e83c9c808a1670dc (diff) | |
download | openbsd-1235f87e2cef60842de72797e55c7587df5ed283.tar.gz openbsd-1235f87e2cef60842de72797e55c7587df5ed283.tar.bz2 openbsd-1235f87e2cef60842de72797e55c7587df5ed283.zip |
Clean up dynamic tables in OPENSSL_cleanup()
This is not currently done in OpenSSL, but it looks more like something
that was mised rather than desired behavior. There are some thread safety
issues here, but those are rife in this codebase anyway (although I heard
claims on some versions of this lib being "fully threadsafe").
no objection jsing
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/crypto_init.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto_init.c b/src/lib/libcrypto/crypto_init.c index 347f9542f1..361bef41a3 100644 --- a/src/lib/libcrypto/crypto_init.c +++ b/src/lib/libcrypto/crypto_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: crypto_init.c,v 1.9 2023/06/19 18:32:05 tb Exp $ */ | 1 | /* $OpenBSD: crypto_init.c,v 1.10 2023/07/02 19:52:01 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -20,6 +20,7 @@ | |||
20 | #include <pthread.h> | 20 | #include <pthread.h> |
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | 22 | ||
23 | #include <openssl/asn1.h> | ||
23 | #include <openssl/conf.h> | 24 | #include <openssl/conf.h> |
24 | #ifndef OPENSSL_NO_ENGINE | 25 | #ifndef OPENSSL_NO_ENGINE |
25 | #include <openssl/engine.h> | 26 | #include <openssl/engine.h> |
@@ -27,6 +28,7 @@ | |||
27 | #include <openssl/err.h> | 28 | #include <openssl/err.h> |
28 | #include <openssl/evp.h> | 29 | #include <openssl/evp.h> |
29 | #include <openssl/objects.h> | 30 | #include <openssl/objects.h> |
31 | #include <openssl/x509v3.h> | ||
30 | 32 | ||
31 | #include "cryptlib.h" | 33 | #include "cryptlib.h" |
32 | #include "x509_issuer_cache.h" | 34 | #include "x509_issuer_cache.h" |
@@ -85,6 +87,13 @@ OPENSSL_cleanup(void) | |||
85 | ENGINE_cleanup(); | 87 | ENGINE_cleanup(); |
86 | #endif | 88 | #endif |
87 | EVP_cleanup(); | 89 | EVP_cleanup(); |
90 | |||
91 | ASN1_STRING_TABLE_cleanup(); | ||
92 | X509V3_EXT_cleanup(); | ||
93 | X509_PURPOSE_cleanup(); | ||
94 | X509_TRUST_cleanup(); | ||
95 | X509_VERIFY_PARAM_table_cleanup(); | ||
96 | |||
88 | x509_issuer_cache_free(); | 97 | x509_issuer_cache_free(); |
89 | 98 | ||
90 | crypto_init_cleaned_up = 1; | 99 | crypto_init_cleaned_up = 1; |