packages/net/openvswitch/patches/0105-removed-calls-to-API-deprecated-in-openssl-1.1.patch
Eneas U de Queiroz 10345fbba5 openvswitch: add openssl-1.1 compatibility
Do not call library initialization when compiling with openssl 1.1.

The package generates the C source files for its DH parameters at
compile time using the host installed openssl.  This patch adds a DH
source, using the same parameters, compatible with openssl 1.0 and 1.1.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
2018-06-07 07:27:57 +08:00

34 lines
1.1 KiB
Diff

From bca4ff53aef16d38aeb1569edaaca6ac4feac6e8 Mon Sep 17 00:00:00 2001
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
Date: Tue, 5 Jun 2018 10:36:51 -0300
Subject: [PATCH] Removed calls to AP deprecated in openssl 1.1
In openssl 1.1, there is no need to initialize the library. It is
automatically done when first used. This allows to compile openvswitch
with openssl 1.1.0 with deprecated API disabled.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
lib/stream-ssl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c
index ebb6f3a6c8..c7443470f5 100644
--- a/lib/stream-ssl.c
+++ b/lib/stream-ssl.c
@@ -947,12 +947,14 @@ do_ssl_init(void)
{
SSL_METHOD *method;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
#ifdef _WIN32
/* The following call is needed if we "#include <openssl/applink.c>". */
CRYPTO_malloc_init();
#endif
SSL_library_init();
SSL_load_error_strings();
+#endif
if (!RAND_status()) {
/* We occasionally see OpenSSL fail to seed its random number generator