Skip to content

Commit

Permalink
[3.8] bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)…
Browse files Browse the repository at this point in the history
… (GH-25627)

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 3c586ca)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
  • Loading branch information
miss-islington authored Apr 26, 2021
1 parent 7b30348 commit 10ee266
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Tools/ssl/multissltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from urllib.error import HTTPError
except ImportError:
from urllib2 import urlopen, HTTPError
import re
import shutil
import string
import subprocess
Expand Down Expand Up @@ -434,23 +435,26 @@ def _post_install_300(self):
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:
f.write(OPENSSL_FIPS_CNF.format(self=self))
@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"
Expand Down

0 comments on commit 10ee266

Please sign in to comment.