From 1235f87e2cef60842de72797e55c7587df5ed283 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 2 Jul 2023 19:52:01 +0000 Subject: 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 --- src/lib/libcrypto/crypto_init.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/crypto_init.c') 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 @@ -/* $OpenBSD: crypto_init.c,v 1.9 2023/06/19 18:32:05 tb Exp $ */ +/* $OpenBSD: crypto_init.c,v 1.10 2023/07/02 19:52:01 tb Exp $ */ /* * Copyright (c) 2018 Bob Beck * @@ -20,6 +20,7 @@ #include #include +#include #include #ifndef OPENSSL_NO_ENGINE #include @@ -27,6 +28,7 @@ #include #include #include +#include #include "cryptlib.h" #include "x509_issuer_cache.h" @@ -85,6 +87,13 @@ OPENSSL_cleanup(void) ENGINE_cleanup(); #endif EVP_cleanup(); + + ASN1_STRING_TABLE_cleanup(); + X509V3_EXT_cleanup(); + X509_PURPOSE_cleanup(); + X509_TRUST_cleanup(); + X509_VERIFY_PARAM_table_cleanup(); + x509_issuer_cache_free(); crypto_init_cleaned_up = 1; -- cgit v1.2.3-55-g6feb