Skip to content

Commit c92b391

Browse files
authored
[3.9] bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942) (#25944)
Also use new make target to install FIPS provider.. (cherry picked from commit e852556) Co-authored-by: Christian Heimes <[email protected]>
1 parent 779983e commit c92b391

File tree

2 files changed

+12
-45
lines changed

2 files changed

+12
-45
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
strategy:
192192
fail-fast: false
193193
matrix:
194-
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14]
194+
openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha16]
195195
env:
196196
OPENSSL_VER: ${{ matrix.openssl_ver }}
197197
MULTISSL_DIR: ${{ github.workspace }}/multissl

Tools/ssl/multissltests.py

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
OPENSSL_RECENT_VERSIONS = [
5252
"1.1.1k",
53-
# "3.0.0-alpha14"
53+
"3.0.0-alpha16"
5454
]
5555

5656
LIBRESSL_OLD_VERSIONS = [
@@ -147,23 +147,6 @@
147147
help="Keep original sources for debugging."
148148
)
149149

150-
OPENSSL_FIPS_CNF = """\
151-
openssl_conf = openssl_init
152-
153-
.include {self.install_dir}/ssl/fipsinstall.cnf
154-
# .include {self.install_dir}/ssl/openssl.cnf
155-
156-
[openssl_init]
157-
providers = provider_sect
158-
159-
[provider_sect]
160-
fips = fips_sect
161-
default = default_sect
162-
163-
[default_sect]
164-
activate = 1
165-
"""
166-
167150

168151
class AbstractBuilder(object):
169152
library = None
@@ -306,12 +289,12 @@ def _unpack_src(self):
306289
log.info("Unpacking files to {}".format(self.build_dir))
307290
tf.extractall(self.build_dir, members)
308291

309-
def _build_src(self):
292+
def _build_src(self, config_args=()):
310293
"""Now build openssl"""
311294
log.info("Running build in {}".format(self.build_dir))
312295
cwd = self.build_dir
313296
cmd = [
314-
"./config",
297+
"./config", *config_args,
315298
"shared", "--debug",
316299
"--prefix={}".format(self.install_dir)
317300
]
@@ -415,35 +398,19 @@ def _post_install(self):
415398
if self.version.startswith("3.0"):
416399
self._post_install_300()
417400

401+
def _build_src(self, config_args=()):
402+
if self.version.startswith("3.0"):
403+
config_args += ("enable-fips",)
404+
super()._build_src(config_args)
405+
418406
def _post_install_300(self):
419407
# create ssl/ subdir with example configs
420-
self._subprocess_call(
421-
["make", "-j1", "install_ssldirs"],
422-
cwd=self.build_dir
423-
)
424408
# Install FIPS module
425-
# https://wiki.openssl.org/index.php/OpenSSL_3.0#Completing_the_installation_of_the_FIPS_Module
426-
fipsinstall_cnf = os.path.join(
427-
self.install_dir, "ssl", "fipsinstall.cnf"
428-
)
429-
openssl_fips_cnf = os.path.join(
430-
self.install_dir, "ssl", "openssl-fips.cnf"
431-
)
432-
fips_mod = os.path.join(self.lib_dir, "ossl-modules/fips.so")
433409
self._subprocess_call(
434-
[
435-
self.openssl_cli, "fipsinstall",
436-
"-out", fipsinstall_cnf,
437-
"-module", fips_mod,
438-
# "-provider_name", "fips",
439-
# "-mac_name", "HMAC",
440-
# "-macopt", "digest:SHA256",
441-
# "-macopt", "hexkey:00",
442-
# "-section_name", "fips_sect"
443-
]
410+
["make", "-j1", "install_ssldirs", "install_fips"],
411+
cwd=self.build_dir
444412
)
445-
with open(openssl_fips_cnf, "w") as f:
446-
f.write(OPENSSL_FIPS_CNF.format(self=self))
413+
447414
@property
448415
def short_version(self):
449416
"""Short version for OpenSSL download URL"""

0 commit comments

Comments
 (0)