diff options
author | Jim Hahn <jrh3@att.com> | 2021-06-11 13:23:20 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-06-11 14:35:32 -0400 |
commit | d6cc02e8a57ead99421947734b8f4bfb078fbfd5 (patch) | |
tree | e4e197635d41e50ab715b2bc46e13decc9808a6a /csit/gen_keystore.sh | |
parent | fe3e91c55264ba67b5130b9841e30b634ac157a6 (diff) |
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 <jrh3@att.com>
Diffstat (limited to 'csit/gen_keystore.sh')
-rwxr-xr-x | csit/gen_keystore.sh | 30 |
1 files changed, 23 insertions, 7 deletions
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" |