summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarma, Vikas <vv8305@att.com>2018-10-19 17:53:45 -0400
committerVarma, Vikas <vv8305@att.com>2018-10-22 10:44:38 -0400
commit986668970c3c0d52485fffef750959a0f3520f5a (patch)
tree6714dfb8a286f7a8c44f741a31ea55dc5eef0a4b
parentc3aa7ebbb6f17c93958103077614f5bdac9837b0 (diff)
add aaf root ca certificates for osdf
Make the certificate updates during runtime. change tab to spaces. Change-Id: I51eb726a49d69c429d83c02e8287430a54062af4 Signed-off-by: Varma, Vikas <vv8305@att.com> Issue-ID: OPTFRA-379
-rwxr-xr-xosdfapp.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/osdfapp.sh b/osdfapp.sh
index 0e1846a..25e3c05 100755
--- a/osdfapp.sh
+++ b/osdfapp.sh
@@ -28,4 +28,17 @@ mkdir -p $LOGS
export OSDF_CONFIG_FILE=${1:-/opt/app/config/osdf_config.yaml} # this file may be passed by invoker
[ ! -e "$OSDF_CONFIG_FILE" ] && unset OSDF_CONFIG_FILE
+if [ -e /opt/app/ssl_cert/aaf_root_ca.cer ]; then
+ #assuming that this would be an ubuntu vm.
+ cp /opt/app/ssl_cert/aaf_root_ca.cer /usr/local/share/ca-certificates/aafcacert.crt
+ chmod 444 /usr/local/share/ca-certificates/aafcacert.crt
+ update-ca-certificates
+fi
+
+if [ -e /etc/ssl/certs/aafcacert.pem ]; then
+ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
+else
+ export REQUESTS_CA_BUNDLE=/opt/app/ssl_cert/aaf_root_ca.cer
+fi
+
python osdfapp.py 2>$LOGS/err.log 1>$LOGS/out.log < /dev/null # running the app