X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fbuscontroller.git;a=blobdiff_plain;f=misc%2Fcert-client-init.sh;h=e9a50d7ea06bb8690185a9097140a0d4c2fc9eaa;hp=a9098956007d21d3cd3df8a5db73deac2da9db28;hb=a2f7b3212b5105eeb5942d75ca25c0a5dbebae52;hpb=ff7ac524776b850b0054026566d4d1026067896d diff --git a/misc/cert-client-init.sh b/misc/cert-client-init.sh index a909895..e9a50d7 100644 --- a/misc/cert-client-init.sh +++ b/misc/cert-client-init.sh @@ -1,41 +1,3 @@ -#!/bin/bash -# -# ============LICENSE_START========================================== -# org.onap.dmaap -# =================================================================== -# Copyright © 2018 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END============================================ -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -# - -# -# This script adds a known local certificate authority (CA) -# to be a recognized certificate authority. -# i.e. it updates the truststore -# -# This script must be run as root. -# -# Works on both CentOS and Ubuntu. -# -set -x - -# IMPORTANT: use a .crt suffix for update-ca-certificates to work -# -AAFCERT=AAF_RootCA.crt -cat >/tmp/$AAFCERT <<'!EOF' -----BEGIN CERTIFICATE----- MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx @@ -67,13 +29,3 @@ cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX dYY= -----END CERTIFICATE----- -!EOF -chmod 444 /tmp/$AAFCERT -if [ -f /etc/redhat-release ] -then - mv /tmp/$AAFCERT /etc/pki/ca-trust/source/anchors/aafcacert.pem - update-ca-trust -else - mv /tmp/$AAFCERT /usr/local/share/ca-certificates/$AAFCERT - update-ca-certificates -fi