summaryrefslogtreecommitdiffstats
path: root/misc/cert-client-init.sh
diff options
context:
space:
mode:
authorATT default cloud user <dgl@research.att.com>2017-12-07 22:59:02 +0000
committerATT default cloud user <dgl@research.att.com>2017-12-07 23:01:13 +0000
commit809cd899ceabf2c9e272884d21ba503cbc3e8b17 (patch)
tree04412636283dfb2a7e8b5857feea58f1cc96b617 /misc/cert-client-init.sh
parent7d7b3b2556035ce2dc7b58a10249b7c225687399 (diff)
Additional config settings anticipating AAF
Issue-ID: DMAAP-181 Change-Id: I733aa00988b35c2a75eb8e4a620d0b94e9445e17 Signed-off-by: ATT default cloud user <dgl@research.att.com>
Diffstat (limited to 'misc/cert-client-init.sh')
-rw-r--r--misc/cert-client-init.sh42
1 files changed, 42 insertions, 0 deletions
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