ATT default cloud user | 809cd89 | 2017-12-07 22:59:02 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # This script is a placeholder for a local certificate authority (CA) |
| 4 | # to be a recognized certificate authority. |
| 5 | # |
| 6 | # This script must be run as root. |
| 7 | # |
| 8 | # Works on both CentOS and Ubuntu. |
| 9 | # |
| 10 | set -x |
| 11 | cat >/tmp/aafcacert.crt <<'!EOF' |
| 12 | -----BEGIN CERTIFICATE----- |
| 13 | **************************************************************** |
| 14 | **************************************************************** |
| 15 | **************************************************************** |
| 16 | **************************************************************** |
| 17 | **************************************************************** |
| 18 | **************************************************************** |
| 19 | **************************************************************** |
| 20 | **************************************************************** |
| 21 | ******* PUT REAL CERTIFICATE HERE **************************** |
| 22 | **************************************************************** |
| 23 | **************************************************************** |
| 24 | **************************************************************** |
| 25 | **************************************************************** |
| 26 | **************************************************************** |
| 27 | **************************************************************** |
| 28 | **************************************************************** |
| 29 | **************************************************************** |
| 30 | **************************************************************** |
| 31 | **************************************************************** |
| 32 | -----END CERTIFICATE----- |
| 33 | !EOF |
| 34 | chmod 444 /tmp/aafcacert.crt |
| 35 | if [ -f /etc/redhat-release ] |
| 36 | then |
| 37 | mv /tmp/aafcacert.crt /etc/pki/ca-trust/source/anchors/aafcacert.pem |
| 38 | update-ca-trust |
| 39 | else |
| 40 | mv /tmp/aafcacert.crt /usr/local/share/ca-certificates/aafcacert.crt |
| 41 | update-ca-certificates |
| 42 | fi |