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

Verifying Openssl configuration #1894

Closed
wants to merge 136 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
9aeb74d
Verifying Openssl configuration
johnmccrae Apr 16, 2024
0ed2fb3
Verifying Openssl configuration
johnmccrae Apr 16, 2024
ff5d8a7
Updating config
johnmccrae Apr 18, 2024
3c4fc96
Got it! have to adjust FIPS now
johnmccrae Apr 18, 2024
1002b2d
Got it! have to adjust FIPS now, adding new compilation flags
johnmccrae Apr 19, 2024
46804fd
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 19, 2024
feb3bbf
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 19, 2024
e51e7ac
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 19, 2024
89975a3
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 19, 2024
4382ba6
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 22, 2024
73475ed
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 22, 2024
07a6ffc
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 22, 2024
390cef6
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 22, 2024
3f020a1
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
2ffa2a7
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
7be2b9e
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
d5352ba
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
b09d21f
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
8ed9aa9
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
b106822
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
e1f0aec
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
5461f9b
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 23, 2024
69c6422
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
936bbda
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
ad12af4
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
54a1efd
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
5ed6c4b
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
e30b14c
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
856df5d
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
1833010
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
34fed53
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
7b9e230
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 24, 2024
075d3ad
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
c5512e1
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
25f7491
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
363b28d
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
e6b6b06
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
1c77df6
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
b851b93
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
8bb24fc
Got it! have to adjust FIPS now, moving FIPS support back to the main…
johnmccrae Apr 25, 2024
6e775a6
Updating to pull in openssl.so
Apr 30, 2024
0043b68
adding fips.dll to the package
May 1, 2024
634f42b
found the fips.dll path and now correctly moving it to the package fo…
johnmccrae May 2, 2024
aa6f53f
found the fips.dll path and now correctly moving it to the package fo…
johnmccrae May 2, 2024
2a1dbe8
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 2, 2024
8d7a877
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 2, 2024
66773aa
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 2, 2024
d7e1a7c
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 2, 2024
22b82b0
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
d39d7c7
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
2cbe88c
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
2d61590
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
7c2f18a
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
fec0f23
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 3, 2024
2038e26
Correcting the Ruby compile to pull in the correct openssl files
johnmccrae May 4, 2024
b08f1c2
Tracking down the missing openssl.so file
johnmccrae May 6, 2024
879556d
Tracking down the missing openssl.so file
johnmccrae May 6, 2024
6ea593b
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
c4172e9
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
e1259af
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
7c1b7ec
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
a64967d
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
bc77cf5
Tracking down the missing openssl.so file
johnmccrae May 7, 2024
3b678bb
What is it with Openssl.so? Why you so crabby?
johnmccrae May 8, 2024
160bc67
What is it with Openssl.so? Why you so crabby?
johnmccrae May 9, 2024
b5e4c06
What is it with Openssl.so? Why you so crabby?
johnmccrae May 9, 2024
22c13ae
What is it with Openssl.so? Why you so crabby?
johnmccrae May 9, 2024
1bb9fa0
What is it with Openssl.so? Why you so crabby?
johnmccrae May 10, 2024
7f2986f
What is it with Openssl.so? Why you so crabby?
johnmccrae May 13, 2024
82a95fc
What is it with Openssl.so? Why you so crabby?
johnmccrae May 13, 2024
76c8a02
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
9f9f27d
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
625d7c8
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
4c9c190
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
39a1599
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
7c9d471
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
4840067
What is it with Openssl.so? Why you so crabby?
johnmccrae May 14, 2024
25b4af0
What is it with Openssl.so? Why you so crabby?
johnmccrae May 15, 2024
4ecf20e
What is it with Openssl.so? Why you so crabby?
johnmccrae May 15, 2024
602e079
What is it with Openssl.so? Why you so crabby?
johnmccrae May 15, 2024
9d2f94a
What is it with Openssl.so? Why you so crabby?
johnmccrae May 15, 2024
4c7449d
What is it with Openssl.so? Why you so crabby?
johnmccrae May 15, 2024
1a2767d
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
9e75281
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
3f63d30
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
dc0e8d8
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
ae4c740
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
51e8a7f
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
d9a4bce
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
62f6dea
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
566b622
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
16a1fd2
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
f8d9457
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
25b8f90
Patching openssl.cnf to add fips section when needed
johnmccrae May 15, 2024
a8875b8
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
ea72e37
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
7dfb83c
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
9f35646
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
c69ab7f
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
e2d0a42
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
dcecfc7
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
9171475
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
632218f
Patching openssl.cnf to add fips section when needed
johnmccrae May 16, 2024
2b08f44
Patching openssl.cnf to add fips section when needed
johnmccrae May 17, 2024
1de960f
Patching openssl.cnf to add fips section when needed
johnmccrae May 17, 2024
bc44b00
Patching openssl.cnf to add fips section when needed
johnmccrae May 17, 2024
4367ec8
Almost got it all working
May 17, 2024
7acd23e
Almost got it all working
May 17, 2024
e5334fa
Patching openssl.cnf to add fips section when needed
johnmccrae May 18, 2024
d6e5dcb
Dammit I am so close now
johnmccrae May 20, 2024
f3c1618
Dammit I am so close now
johnmccrae May 20, 2024
2ef6e82
Dammit I am so close now
johnmccrae May 20, 2024
25bc6f5
Dammit I am so close now
johnmccrae May 20, 2024
4f4dbed
Dammit I am so close now
johnmccrae May 20, 2024
80f5c3d
Tweaking openssl to match chef-18
johnmccrae May 24, 2024
062f191
Tweaking openssl to match chef-18
johnmccrae May 24, 2024
f8c2427
Tweaking openssl to match chef-18
johnmccrae May 24, 2024
63149b0
Tweaking openssl to match chef-18
johnmccrae May 24, 2024
86b7a33
Tweaking openssl to match chef-18
johnmccrae May 24, 2024
87e1c6b
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
9eaa7e8
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
4bbfcab
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
c289f99
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
6cbd750
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
edd3f6b
Tweaking openssl to match chef-18
johnmccrae May 25, 2024
e06b373
Tweaking openssl to match chef-18
johnmccrae May 27, 2024
4b6bb1d
Tweaking openssl to match chef-18
johnmccrae May 27, 2024
8865568
Tweaking openssl to match chef-18
johnmccrae May 27, 2024
382e658
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
bfa1a8a
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
f593510
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
40e15ea
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
7bf613b
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
a4375c4
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
f7eab7c
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
1a75183
Tweaking openssl to match chef-18
johnmccrae May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- "a/openssl.cnf"
+++ "b/openssl.cnf"
@@ -75,6 +75,11 @@ activate = 1
[legacy_sect]
activate = 1

+[fips_sect]
+activate = 1
+conditional-errors = 1
+security-checks = 1
+
####################################################################
[ ca ]
default_ca = CA_default # The default ca section
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,3 @@ index ac858d6..d1cb967 100644

####################################################################
[ ca ]
diff --git a/apps/openssl.cnf b/apps/openssl.cnf
index 12bc408..35a4282 100644
--- a/apps/openssl.cnf
+++ b/apps/openssl.cnf
@@ -56,6 +56,7 @@ providers = provider_sect
# 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
@@ -69,8 +70,10 @@ default = default_sect
# OpenSSL may not work correctly which could lead to significant system
# problems including inability to remotely access the system.
[default_sect]
-# activate = 1
+activate = 1

+[legacy_sect]
+activate = 1

####################################################################
[ ca ]
11 changes: 0 additions & 11 deletions config/patches/openssl/openssl-3.0.1-do-not-install-docs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,4 @@
+install: install_sw install_ssldirs {- $disabled{fips} ? "" : "install_fips" -}

uninstall: uninstall_docs uninstall_sw {- $disabled{fips} ? "" : "uninstall_fips" -}

--- openssl-3.0.1/Configurations/windows-makefile.tmpl.orig 2022-03-04 04:46:02.850951693 +0000
+++ openssl-3.0.1/Configurations/windows-makefile.tmpl 2022-03-04 04:46:13.353494915 +0000
@@ -453,7 +453,7 @@
@$(ECHO) "Tests are not supported with your chosen Configure options"
@{- output_on() if !$disabled{tests}; "\@rem" -}

-install: install_sw install_ssldirs install_docs {- $disabled{fips} ? "" : "install_fips" -}
+install: install_sw install_ssldirs {- $disabled{fips} ? "" : "install_fips" -}

uninstall: uninstall_docs uninstall_sw {- $disabled{fips} ? "" : "uninstall_fips" -}

1 change: 1 addition & 0 deletions config/software/chef.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
bundle_excludes = excluded_groups + %w{development test}

bundle "install --without #{bundle_excludes.join(" ")}", env: env
# bundle "config set --local without #{bundle_excludes.join(" ")}", env: env

ruby "post-bundle-install.rb", env: env

Expand Down
44 changes: 22 additions & 22 deletions config/software/openssl-customization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,30 @@ def get_sanitized_rbconfig(config)
File.join(embedded_ruby_lib_dir, "openssl.rb")
end

if windows?
embedded_ruby_site_dir = get_sanitized_rbconfig("sitelibdir")
source_ssl_env_hack = File.join(project_dir, "windows", "ssl_env_hack.rb")
destination_ssl_env_hack = File.join(embedded_ruby_site_dir, "ssl_env_hack.rb")
# if windows?
# embedded_ruby_site_dir = get_sanitized_rbconfig("sitelibdir")
# source_ssl_env_hack = File.join(project_dir, "windows", "ssl_env_hack.rb")
# destination_ssl_env_hack = File.join(embedded_ruby_site_dir, "ssl_env_hack.rb")

create_directory(embedded_ruby_site_dir)
# create_directory(embedded_ruby_site_dir)

copy(source_ssl_env_hack, destination_ssl_env_hack)
# copy(source_ssl_env_hack, destination_ssl_env_hack)

# Unfortunately there is no patch on windows, but luckily we only need to append a line to the openssl.rb
# to pick up our script which find the CA bundle in omnibus installations and points SSL_CERT_FILE to it
# if it's not already set
File.open(source_openssl_rb, "r+") do |f|
unpatched_openssl_rb = f.read
f.rewind
f.write("\nrequire 'ssl_env_hack'\n")
f.write(unpatched_openssl_rb)
end
else
File.open(source_openssl_rb, "r+") do |f|
unpatched_openssl_rb = f.read
f.rewind
f.write(unpatched_openssl_rb)
end
end
# # Unfortunately there is no patch on windows, but luckily we only need to append a line to the openssl.rb
# # to pick up our script which find the CA bundle in omnibus installations and points SSL_CERT_FILE to it
# # if it's not already set
# File.open(source_openssl_rb, "r+") do |f|
# unpatched_openssl_rb = f.read
# f.rewind
# f.write("\nrequire 'ssl_env_hack'\n")
# f.write(unpatched_openssl_rb)
# end
# else
# File.open(source_openssl_rb, "r+") do |f|
# unpatched_openssl_rb = f.read
# f.rewind
# f.write(unpatched_openssl_rb)
# end
# end
end
end
11 changes: 1 addition & 10 deletions config/software/openssl-fips.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,7 @@

if windows?
default_env = with_standard_compiler_flags(with_embedded_path)

if windows_arch_i386?
# Patch Makefile.org to update the compiler flags/options table for mingw.
patch source: "openssl-fips-fix-compiler-flags-table-for-msys.patch", env: default_env

platform = "mingw"
else
platform = "mingw64"
end

platform = "mingw64"
configure_command = ["perl.exe ./Configure #{platform}"]
configure_command << "--prefix=#{install_dir}/embedded"
elsif ppc64? && rhel?
Expand Down
Loading