Skip to content

Commit

Permalink
Use the modules built by relenv
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Jul 24, 2023
1 parent 077b5ea commit 4a1eec2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 32 deletions.
24 changes: 12 additions & 12 deletions relenv/build/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,18 +401,18 @@ def build_python(env, dirs, logfp):
)


# build.add(
# "openssl-fips-module",
# build_func=build_openssl_fips,
# download={
# "url": "https://www.openssl.org/source/openssl-{version}.tar.gz",
# "fallback_url": "https://woz.io/relenv/dependencies/openssl-{version}.tar.gz",
# "version": "3.0.8",
# "md5sum": "61e017cf4fea1b599048f621f1490fbd",
# "checkfunc": tarball_version,
# "checkurl": "https://www.openssl.org/source/",
# },
# )
build.add(
"openssl-fips-module",
build_func=build_openssl_fips,
download={
"url": "https://www.openssl.org/source/openssl-{version}.tar.gz",
"fallback_url": "https://woz.io/relenv/dependencies/openssl-{version}.tar.gz",
"version": "3.0.8",
"md5sum": "61e017cf4fea1b599048f621f1490fbd",
"checkfunc": tarball_version,
"checkurl": "https://www.openssl.org/source/",
},
)


build.add(
Expand Down
22 changes: 2 additions & 20 deletions relenv/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ def setup_openssl():
openssl_bin = shutil.which("openssl")
if not openssl_bin:
debug("Could not find the 'openssl' binary in the path")
os.environ["OPENSSL_MODULES"] = str(sys.RELENV / "lib" / "ossl-modules")
else:
proc = subprocess.run(
[openssl_bin, "version", "-d"],
Expand All @@ -708,25 +707,8 @@ def setup_openssl():
cert_file = path / "cert.pem"
if cert_file.exists() and not os.environ.get("SSL_CERT_FILE"):
os.environ["SSL_CERT_FILE"] = str(cert_file)
if "OPENSSL_MODULES" not in os.environ:
proc = subprocess.run(
[openssl_bin, "info", "-modulesdir"],
universal_newlines=True,
shell=False,
check=False,
capture_output=True,
)
if proc.returncode != 0:
msg = "Unable to get the certificates modules from openssl"
if proc.stderr:
msg += f": {proc.stderr}"
debug(msg)
os.environ["OPENSSL_MODULES"] = str(
sys.RELENV / "lib" / "ossl-modules"
)
else:
os.environ["OPENSSL_MODULES"] = str(proc.stdout.strip())

if "OPENSSL_MODULES" not in os.environ:
os.environ["OPENSSL_MODULES"] = str(sys.RELENV / "lib" / "ossl-modules")

def setup_crossroot():
"""
Expand Down

0 comments on commit 4a1eec2

Please sign in to comment.