blob: 53701f899a6e88e34df2fa744c5b41e05958dc62 [file] [log] [blame]
ATT default cloud user809cd892017-12-07 22:59:02 +00001#!/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#
10set -x
11cat >/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
34chmod 444 /tmp/aafcacert.crt
35if [ -f /etc/redhat-release ]
36then
37 mv /tmp/aafcacert.crt /etc/pki/ca-trust/source/anchors/aafcacert.pem
38 update-ca-trust
39else
40 mv /tmp/aafcacert.crt /usr/local/share/ca-certificates/aafcacert.crt
41 update-ca-certificates
42fi