From 6ef6c0915bc322dc0923f17d5e68cbada5682a2b Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 19 Apr 2022 16:27:32 -0400 Subject: [PATCH 1/2] Fix keyring Strip safkeyring:// and safkeyring://// when reading keyring location so that gskit can read the keyring. Signed-off-by: 1000TurquoisePogs --- bin/configure.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/configure.sh b/bin/configure.sh index adb482f36..b990e9f8e 100755 --- a/bin/configure.sh +++ b/bin/configure.sh @@ -75,8 +75,17 @@ fi # Keystore settings are used for both https server and Caching Service export "${HTTPS_PREFIX}label=${KEY_ALIAS}" -if [ "${KEYSTORE_TYPE}" = "JCERACFKS" ]; then - export "${HTTPS_PREFIX}keyring=${KEYRING_OWNER}/${KEYRING_NAME}" + +if [ "${ZWE_zowe_certificate_keystore_type}" = "JCERACFKS" ]; then + export "${HTTPS_PREFIX}keyring=${ZWE_zowe_certificate_keystore_file}" + case "${ZWE_zowe_certificate_keystore_file}" in + safkeyring:////*) + export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + ;; + safkeyring://*) + export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + ;; + esac else export "${HTTPS_PREFIX}keyring=${KEYSTORE}" export "${HTTPS_PREFIX}password=${KEYSTORE_PASSWORD}" From e19bd1d2e7171ae96ad4625236be4cbf1d2effda Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Wed, 20 Apr 2022 09:31:33 -0400 Subject: [PATCH 2/2] Update configure.sh Fix typo Signed-off-by: 1000TurquoisePogs --- bin/configure.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/configure.sh b/bin/configure.sh index b990e9f8e..c5025f25c 100755 --- a/bin/configure.sh +++ b/bin/configure.sh @@ -80,10 +80,12 @@ if [ "${ZWE_zowe_certificate_keystore_type}" = "JCERACFKS" ]; then export "${HTTPS_PREFIX}keyring=${ZWE_zowe_certificate_keystore_file}" case "${ZWE_zowe_certificate_keystore_file}" in safkeyring:////*) - export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + trimmed=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + export "${HTTPS_PREFIX}keyring=$trimmed" ;; safkeyring://*) - export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + trimmed=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + export "${HTTPS_PREFIX}keyring=$trimmed" ;; esac else