|
|
a359fa |
From 60e4274ff758af0d68ba585e7286a5cddb7c4778 Mon Sep 17 00:00:00 2001
|
|
|
a359fa |
From: Omair Majid <omajid@redhat.com>
|
|
|
a359fa |
Date: Thu, 10 Jan 2019 18:37:24 -0500
|
|
|
a359fa |
Subject: [PATCH 5/7] Prefer OpenSSL 1.0.x for portable builds
|
|
|
a359fa |
|
|
|
a359fa |
Future releases of .NET Core prefer OpenSSL 1.1.x. For the sake of
|
|
|
a359fa |
compatiblity, 2.x releases should prefer 1.0.x.
|
|
|
a359fa |
---
|
|
|
a359fa |
.../opensslshim.cpp | 11 +++++------
|
|
|
a359fa |
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
a359fa |
|
|
|
a359fa |
diff --git a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.cpp b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.cpp
|
|
|
a359fa |
index 585f7ac23f..c98869a94e 100644
|
|
|
a359fa |
--- a/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.cpp
|
|
|
a359fa |
+++ b/src/Native/Unix/System.Security.Cryptography.Native/opensslshim.cpp
|
|
|
a359fa |
@@ -47,12 +47,6 @@ bool OpenLibrary()
|
|
|
a359fa |
libssl = dlopen(soName, RTLD_LAZY);
|
|
|
a359fa |
}
|
|
|
a359fa |
|
|
|
a359fa |
- if (libssl == nullptr)
|
|
|
a359fa |
- {
|
|
|
a359fa |
- // Prefer OpenSSL 1.1.x
|
|
|
a359fa |
- libssl = dlopen("libssl.so.1.1", RTLD_LAZY);
|
|
|
a359fa |
- }
|
|
|
a359fa |
-
|
|
|
a359fa |
if (libssl == nullptr)
|
|
|
a359fa |
{
|
|
|
a359fa |
// Debian 9 has dropped support for SSLv3 and so they have bumped their soname. Let's try it
|
|
|
a359fa |
@@ -73,6 +67,11 @@ bool OpenLibrary()
|
|
|
a359fa |
libssl = dlopen("libssl.so.10", RTLD_LAZY);
|
|
|
a359fa |
}
|
|
|
a359fa |
|
|
|
a359fa |
+ if (libssl == nullptr)
|
|
|
a359fa |
+ {
|
|
|
a359fa |
+ libssl = dlopen("libssl.so.1.1", RTLD_LAZY);
|
|
|
a359fa |
+ }
|
|
|
a359fa |
+
|
|
|
a359fa |
return libssl != nullptr;
|
|
|
a359fa |
}
|
|
|
a359fa |
|
|
|
a359fa |
--
|
|
|
a359fa |
2.20.1
|
|
|
a359fa |
|