Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d1a203

Browse files
tiranmiss-islington
authored andcommitted
bpo-40479: Test with latest OpenSSL versions (pythonGH-20108)
* 1.0.2u (EOL)* 1.1.0l (EOL)* 1.1.1g* 3.0.0-alpha2 (disabled for now)Build the FIPS provider and create a FIPS configuration file for OpenSSL3.0.0.Signed-off-by: Christian Heimes <christian@python.org>Automerge-Triggered-By:@tiran(cherry picked from commit62d618c)Co-authored-by: Christian Heimes <christian@python.org>
1 parent7ef2751 commit9d1a203

File tree

2 files changed

+60
-3
lines changed

2 files changed

+60
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update multissltest helper to test with latest OpenSSL 1.0.2, 1.1.0, 1.1.1,
2+
and 3.0.0-alpha.

‎Tools/ssl/multissltests.py‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
log=logging.getLogger("multissl")
4242

4343
OPENSSL_OLD_VERSIONS= [
44-
"1.0.2",
4544
]
4645

4746
OPENSSL_RECENT_VERSIONS= [
48-
"1.0.2t",
47+
"1.0.2u",
4948
"1.1.0l",
50-
"1.1.1f",
49+
"1.1.1g",
50+
# "3.0.0-alpha2"
5151
]
5252

5353
LIBRESSL_OLD_VERSIONS= [
@@ -143,6 +143,23 @@
143143
help="Keep original sources for debugging."
144144
)
145145

146+
OPENSSL_FIPS_CNF="""\
147+
openssl_conf = openssl_init
148+
149+
.include {self.install_dir}/ssl/fipsinstall.cnf
150+
# .include {self.install_dir}/ssl/openssl.cnf
151+
152+
[openssl_init]
153+
providers = provider_sect
154+
155+
[provider_sect]
156+
fips = fips_sect
157+
default = default_sect
158+
159+
[default_sect]
160+
activate = 1
161+
"""
162+
146163

147164
classAbstractBuilder(object):
148165
library=None
@@ -291,9 +308,13 @@ def _make_install(self):
291308
["make","-j1",self.install_target],
292309
cwd=self.build_dir
293310
)
311+
self._post_install()
294312
ifnotself.args.keep_sources:
295313
shutil.rmtree(self.build_dir)
296314

315+
def_post_install(self):
316+
pass
317+
297318
definstall(self):
298319
log.info(self.openssl_cli)
299320
ifnotself.has_opensslorself.args.force:
@@ -365,6 +386,40 @@ class BuildOpenSSL(AbstractBuilder):
365386
# only install software, skip docs
366387
install_target='install_sw'
367388

389+
def_post_install(self):
390+
ifself.version.startswith("3.0"):
391+
self._post_install_300()
392+
393+
def_post_install_300(self):
394+
# create ssl/ subdir with example configs
395+
self._subprocess_call(
396+
["make","-j1","install_ssldirs"],
397+
cwd=self.build_dir
398+
)
399+
# Install FIPS module
400+
# https://wiki.openssl.org/index.php/OpenSSL_3.0#Completing_the_installation_of_the_FIPS_Module
401+
fipsinstall_cnf=os.path.join(
402+
self.install_dir,"ssl","fipsinstall.cnf"
403+
)
404+
openssl_fips_cnf=os.path.join(
405+
self.install_dir,"ssl","openssl-fips.cnf"
406+
)
407+
fips_mod=os.path.join(self.lib_dir,"ossl-modules/fips.so")
408+
self._subprocess_call(
409+
[
410+
self.openssl_cli,"fipsinstall",
411+
"-out",fipsinstall_cnf,
412+
"-module",fips_mod,
413+
"-provider_name","fips",
414+
"-mac_name","HMAC",
415+
"-macopt","digest:SHA256",
416+
"-macopt","hexkey:00",
417+
"-section_name","fips_sect"
418+
]
419+
)
420+
withopen(openssl_fips_cnf,"w")asf:
421+
f.write(OPENSSL_FIPS_CNF.format(self=self))
422+
368423

369424
classBuildLibreSSL(AbstractBuilder):
370425
library="LibreSSL"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp