Skip to content

Commit

Permalink
comment out default_sect activate
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Powell <[email protected]>
  • Loading branch information
tpowell-progress committed May 16, 2024
1 parent 5a7a50b commit 465eff5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,24 @@
# Updating the openssl.cnf file to enable the fips provider
command "sed -i -e 's|# .include fipsmodule.cnf|.include #{fips_cnf_file}|g' #{install_dir}/embedded/ssl/openssl.cnf"
command "sed -i -e 's|# fips = fips_sect|fips = fips_sect|g' #{install_dir}/embedded/ssl/openssl.cnf"
contents=File.read("#{install_dir}/embedded/ssl/openssl.cnf")
new_file=[]
comment_next = false
contents.each_line do |line|
if comment_next
line.gsub!(/^/, "#")
comment_next = false
end
new_file << line
if line.include?('[default_sect]')
comment_next = true
end
end
File.open("#{install_dir}/embedded/ssl/openssl.cnf", "wt") do |f|
new_file.each do |line|
f.puts line
end
end
# command "sed -i -e 's|default = default_sect|#default = default_sect|g' #{install_dir}/embedded/ssl/openssl.cnf" # this might be unnecessary
command "#{windows? ? 'Perl.exe' : ''} ./util/wrap.pl -fips #{install_dir}/embedded/bin/openssl list -provider-path providers -provider fips -providers"
end
Expand Down

0 comments on commit 465eff5

Please sign in to comment.