From 809cd899ceabf2c9e272884d21ba503cbc3e8b17 Mon Sep 17 00:00:00 2001 From: ATT default cloud user Date: Thu, 7 Dec 2017 22:59:02 +0000 Subject: Additional config settings anticipating AAF Issue-ID: DMAAP-181 Change-Id: I733aa00988b35c2a75eb8e4a620d0b94e9445e17 Signed-off-by: ATT default cloud user --- misc/cert-client-init.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 misc/cert-client-init.sh (limited to 'misc/cert-client-init.sh') diff --git a/misc/cert-client-init.sh b/misc/cert-client-init.sh new file mode 100644 index 0000000..53701f8 --- /dev/null +++ b/misc/cert-client-init.sh @@ -0,0 +1,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 -- cgit 1.2.3-korg