summaryrefslogtreecommitdiffstats
path: root/tcpd/tlspasswordcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcpd/tlspasswordcache.c')
-rw-r--r--tcpd/tlspasswordcache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tcpd/tlspasswordcache.c b/tcpd/tlspasswordcache.c
index a5de624..44a06e0 100644
--- a/tcpd/tlspasswordcache.c
+++ b/tcpd/tlspasswordcache.c
@@ -370,8 +370,16 @@ typedef EVP_CIPHER_CTX CIPHER_CONTEXT;
#define RANDOM_BYTES RAND_pseudo_bytes
#define CONTEXT(ctx) (ctx)
+
+#endif
+
+#ifndef OPENSSL_VERSION_MAJOR
+#define OPENSSL_VERSION_MAJOR 0
#endif
+#if OPENSSL_VERSION_MAJOR >= 3
+#include <openssl/provider.h>
+#endif
#if HAVE_OPENSSL097
@@ -386,6 +394,11 @@ int tlspassword_init()
if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P))
gcry_check_version(NULL);
#endif
+
+#if OPENSSL_VERSION_MAJOR >= 3
+ OSSL_PROVIDER_load(NULL, "legacy");
+ OSSL_PROVIDER_load(NULL, "default");
+#endif
return 1;
}