From d6cc02e8a57ead99421947734b8f4bfb078fbfd5 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 11 Jun 2021 13:23:20 -0400 Subject: Rename to message-router Modified the CSITs to use message-router for the simulator name. Also added a Root CA so that the ssl certificates can be signed. Removed property file overrides that are no longer needed. Issue-ID: POLICY-3384 Change-Id: I6f1bc53f192567eeab0e71a64d9eaec814a38dd0 Signed-off-by: Jim Hahn --- csit/gen_keystore.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'csit/gen_keystore.sh') diff --git a/csit/gen_keystore.sh b/csit/gen_keystore.sh index d40ff68a..9b1cdfd6 100755 --- a/csit/gen_keystore.sh +++ b/csit/gen_keystore.sh @@ -23,16 +23,32 @@ # DIR="${0%/*}/config" -DNSFILE="${DIR}/dns_keystore.txt" -OUTFILE="${DIR}/ks.jks" +cd "${DIR}" + +OUTFILE=ks.jks + +ALIAS="policy@policy.onap.org" +PASS=Pol1cy_0nap dn="C=US, O=ONAP, OU=OSAAF, OU=policy@policy.onap.org:DEV, CN=policy" -san=`paste -sd , "${DNSFILE}"` -rm -f "$OUTFILE" +rm -f "${OUTFILE}" + +keytool -genkeypair -alias "${ALIAS}" -validity 30 \ + -keyalg RSA -dname "${dn}" -keystore "${OUTFILE}" \ + -keypass "${PASS}" -storepass "${PASS}" + +keytool -certreq -alias "${ALIAS}" -keystore ks.jks -file ks.csr \ + -storepass "${PASS}" + +openssl x509 -CA caroot.cer -CAkey cakey.pem -CAserial caserial.txt \ + -req -in ks.csr -out ks.cer -passin "pass:${PASS}" \ + -extfile dns_ssl.txt -days 30 + +keytool -import -noprompt -file caroot.cer -keystore ks.jks \ + -storepass "${PASS}" -keytool -genkeypair -alias "policy@policy.onap.org" -validity 30 \ - -keyalg RSA -dname "$dn" -keystore "$OUTFILE" \ - -keypass Pol1cy_0nap -storepass Pol1cy_0nap -ext "SAN=$san" +keytool -import -alias "${ALIAS}" -file ks.cer -keystore ks.jks \ + -storepass "${PASS}" chmod 644 "$OUTFILE" -- cgit 1.2.3-korg