diff options
-rwxr-xr-x | functions/defaults.sh | 1 | ||||
-rwxr-xr-x | share/hooks/0195-remove-ssl-cert-snakeoil.chroot | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index d2b71058b..3f8825202 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -507,6 +507,7 @@ Set_defaults () remove-openssh-server-host-keys \ remove-python-py \ remove-temporary-files \ + remove-ssl-cert-snakeoil \ remove-udev-persistent-cd-rules \ remove-udev-persistent-net-rules \ remove-systemd-machine-id \ diff --git a/share/hooks/0195-remove-ssl-cert-snakeoil.chroot b/share/hooks/0195-remove-ssl-cert-snakeoil.chroot new file mode 100755 index 000000000..cdfe39d24 --- /dev/null +++ b/share/hooks/0195-remove-ssl-cert-snakeoil.chroot @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +# Remove ssl-cert snakeoil + +if [ -e /etc/ssl/certs/ssl-cert-snakeoil.pem ] +then + rm -f /etc/ssl/certs/$(openssl x509 -hash -noout -in /etc/ssl/certs/ssl-cert-snakeoil.pem) + + rm -f /etc/ssl/certs/ssl-cert-snakeoil.pem + rm -f /etc/ssl/private/ssl-cert-snakeoil.key +fi |