summaryrefslogtreecommitdiffstats
path: root/misc/cert-client-init.sh
blob: 53701f899a6e88e34df2fa744c5b41e05958dc62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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