blob: 53701f899a6e88e34df2fa744c5b41e05958dc62 [file] [log] [blame]
#!/bin/bash
#
# This script is a placeholder for a local certificate authority (CA)
# to be a recognized certificate authority.
#
# This script must be run as root.
#
# Works on both CentOS and Ubuntu.
#
set -x
cat >/tmp/aafcacert.crt <<'!EOF'
-----BEGIN CERTIFICATE-----
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
******* PUT REAL CERTIFICATE HERE ****************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
****************************************************************
-----END CERTIFICATE-----
!EOF
chmod 444 /tmp/aafcacert.crt
if [ -f /etc/redhat-release ]
then
mv /tmp/aafcacert.crt /etc/pki/ca-trust/source/anchors/aafcacert.pem
update-ca-trust
else
mv /tmp/aafcacert.crt /usr/local/share/ca-certificates/aafcacert.crt
update-ca-certificates
fi