Use relenv OpenSSL

This commit is contained in:
Twangboy 2023-03-28 13:46:54 -06:00 committed by Pedro Algarvio
parent b767ce0c8e
commit 2418a8504f
4 changed files with 2 additions and 67 deletions

View file

@ -265,24 +265,6 @@ If ( Test-Path -Path "$BLD_PY_BIN" ) {
exit 1
}
#-------------------------------------------------------------------------------
# Retrieving SSL Libraries
#-------------------------------------------------------------------------------
$ssllibs = "libeay32.dll",
"ssleay32.dll"
$ssllibs | ForEach-Object {
$url = "$SALT_DEP_URL/openssl/1.1.1s/$_"
$file = "$SCRIPTS_DIR\$_"
Write-Host "Retrieving $_`: " -NoNewline
Invoke-WebRequest -Uri "$url" -OutFile "$file" | Out-Null
if ( Test-Path -Path "$file" ) {
Write-Result "Success" -ForegroundColor Green
} else {
Write-Result "Failed" -ForegroundColor Red
exit 1
}
}
#-------------------------------------------------------------------------------
# Removing Unneeded files from Python
#-------------------------------------------------------------------------------

View file

@ -24,7 +24,7 @@ def _find_libcrypto():
Find the path (or return the short name) of libcrypto.
"""
if sys.platform.startswith("win"):
lib = "libeay32"
lib = "libcrypto-1_1"
elif salt.utils.platform.is_darwin():
# will look for several different location on the system,
# Search in the following order. salts pkg, homebrew, macports, finnally

View file

@ -426,53 +426,6 @@ class DownloadWindowsDlls(Command):
platform_bits, _ = platform.architecture()
url = "https://repo.saltproject.io/windows/dependencies/{bits}/{fname}"
dest = os.path.join(os.path.dirname(sys.executable), "{fname}")
with indent_log():
for fname in (
"openssl/1.1.1k/ssleay32.dll",
"openssl/1.1.1k/libeay32.dll",
):
# See if the library is already on the system
if find_library(fname):
continue
furl = url.format(bits=platform_bits[:2], fname=fname)
fdest = dest.format(fname=os.path.basename(fname))
if not os.path.exists(fdest):
log.info("Downloading {} to {} from {}".format(fname, fdest, furl))
try:
from contextlib import closing
import requests
with closing(requests.get(furl, stream=True)) as req:
if req.status_code == 200:
with open(fdest, "wb") as wfh:
for chunk in req.iter_content(chunk_size=4096):
if chunk: # filter out keep-alive new chunks
wfh.write(chunk)
wfh.flush()
else:
log.error(
"Failed to download {} to {} from {}".format(
fname, fdest, furl
)
)
except ImportError:
req = urlopen(furl)
if req.getcode() == 200:
with open(fdest, "wb") as wfh:
while True:
chunk = req.read(4096)
if not chunk:
break
wfh.write(chunk)
wfh.flush()
else:
log.error(
"Failed to download {} to {} from {}".format(
fname, fdest, furl
)
)
class Sdist(sdist):

View file

@ -129,7 +129,7 @@ class RSAX931Test(TestCase):
Test _find_libcrypto on Windows hosts.
"""
lib_path = _find_libcrypto()
self.assertEqual(lib_path, "libeay32")
self.assertEqual(lib_path, "libcrypto-1_1")
@pytest.mark.skip_unless_on_smartos
def test_find_libcrypto_smartos(self):