Skip to content

Commit

Permalink
remove expired DST root CA
Browse files Browse the repository at this point in the history
see https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/:

> The currently recommended certificate chain as presented to Let’s Encrypt ACME clients when new certificates are issued contains an intermediate certificate (ISRG Root X1) that is signed by an old DST Root CA X3 certificate that expires on 2021-09-30. In some cases the OpenSSL 1.0.2 version will regard the certificates issued by the Let’s Encrypt CA as having an expired trust chain.

(The Ubuntu VM is on OpenSSL 1.0.1f)

closes rapid7#590
  • Loading branch information
deargle-carve committed Jul 13, 2023
1 parent 408d368 commit 659599f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions chef/cookbooks/metasploitable/recipes/system_config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/ and https://github.com/chef/chef/issues/12126

bash 'disable expired DST Root CA X3 certificate' do
code <<-EOS
sed -i 's:^mozilla/DST_Root_CA_X3.crt:!mozilla/DST_Root_CA_X3.crt:' /etc/ca-certificates.conf
update-ca-certificates
EOS
not_if "grep -q '^!mozilla/DST_Root_CA_X3.crt' /etc/ca-certificates.conf"
end

ENV['SSL_CERT_FILE'] = '/etc/ssl/certs/ca-certificates.crt'
1 change: 1 addition & 0 deletions chef/dev/ub1404/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Vagrant.configure("2") do |config|

chef.add_recipe "apt::default"
chef.add_recipe "iptables::default"
chef.add_recipe "metasploitable:system_config"
chef.add_recipe "metasploitable::users"
chef.add_recipe "metasploitable::mysql"
chef.add_recipe "metasploitable::apache_continuum"
Expand Down
2 changes: 2 additions & 0 deletions packer/templates/ubuntu_1404.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
],
"run_list": [
"apt::default",
"iptables::default",
"metasploitable::system_config",
"metasploitable::users",
"metasploitable::mysql",
"metasploitable::apache_continuum",
Expand Down

0 comments on commit 659599f

Please sign in to comment.