mirror of
https://github.com/python/cpython.git
synced 2025-09-09 02:11:51 +00:00
[3.9] bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624) (GH-25626)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 3c586ca500
)
Co-authored-by: Christian Heimes <christian@python.org>
Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
b348580da6
commit
3b917d1774
1 changed files with 14 additions and 10 deletions
|
@ -33,6 +33,7 @@ try:
|
|||
from urllib.error import HTTPError
|
||||
except ImportError:
|
||||
from urllib2 import urlopen, HTTPError
|
||||
import re
|
||||
import shutil
|
||||
import string
|
||||
import subprocess
|
||||
|
@ -434,11 +435,11 @@ class BuildOpenSSL(AbstractBuilder):
|
|||
self.openssl_cli, "fipsinstall",
|
||||
"-out", fipsinstall_cnf,
|
||||
"-module", fips_mod,
|
||||
"-provider_name", "fips",
|
||||
"-mac_name", "HMAC",
|
||||
"-macopt", "digest:SHA256",
|
||||
"-macopt", "hexkey:00",
|
||||
"-section_name", "fips_sect"
|
||||
# "-provider_name", "fips",
|
||||
# "-mac_name", "HMAC",
|
||||
# "-macopt", "digest:SHA256",
|
||||
# "-macopt", "hexkey:00",
|
||||
# "-section_name", "fips_sect"
|
||||
]
|
||||
)
|
||||
with open(openssl_fips_cnf, "w") as f:
|
||||
|
@ -446,11 +447,14 @@ class BuildOpenSSL(AbstractBuilder):
|
|||
@property
|
||||
def short_version(self):
|
||||
"""Short version for OpenSSL download URL"""
|
||||
short_version = self.version.rstrip(string.ascii_letters)
|
||||
if short_version.startswith("0.9"):
|
||||
short_version = "0.9.x"
|
||||
return short_version
|
||||
|
||||
mo = re.search(r"^(\d+)\.(\d+)\.(\d+)", self.version)
|
||||
parsed = tuple(int(m) for m in mo.groups())
|
||||
if parsed < (1, 0, 0):
|
||||
return "0.9.x"
|
||||
if parsed >= (3, 0, 0):
|
||||
# OpenSSL 3.0.0 -> /old/3.0/
|
||||
parsed = parsed[:2]
|
||||
return ".".join(str(i) for i in parsed)
|
||||
|
||||
class BuildLibreSSL(AbstractBuilder):
|
||||
library = "LibreSSL"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue