Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openssl-patch to fix legacy error on 3.0.11 #1874

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- apps/openssl.cnf.org 2024-02-08 14:01:32
+++ apps/openssl.cnf 2024-02-08 14:21:31
@@ -56,6 +56,7 @@
# List of providers to load
[provider_sect]
default = default_sect
+legacy = legacy_sect
# The fips section name should match the section name inside the
# included fipsmodule.cnf.
# fips = fips_sect
@@ -71,6 +72,8 @@
[default_sect]
# activate = 1

+[legacy_sect]
+activate = 1

####################################################################
[ ca ]
14 changes: 12 additions & 2 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,15 @@
# Some of the algorithms which are being used are deprecated in OpenSSL3 and moved to legacy provider.
# We need those algorithms for the working of chef-workstation and other packages.
# This patch will enable the legacy providers!
configure_args << "enable-legacy"
patch source: "openssl-3.0.0-enable-legacy-provider.patch", env: patch_env
if windows?
if version.start_with? "= 3.0.9"
configure_args << "enable-legacy"
patch source: "openssl-3-0-9-enable-legacy-provider.patch", env: patch_env
end
else
configure_args << "enable-legacy"
patch source: "openssl-3.0.0-enable-legacy-provider.patch", env: patch_env
end
end

if version.start_with?("1.0.2") && mac_os_x? && arm?
Expand All @@ -189,6 +196,9 @@

if version.start_with?("1.0.2") && windows?
patch source: "openssl-1.0.1j-windows-relocate-dll.patch", env: env
elsif version.start_with?("3.0.9") && windows?
configure_args << "enable-legacy"
patch source: "openssl-3-0-9-enable-legacy-provider.patch", env: env
end

make "depend", env: env
Expand Down