From 3efd7ba91de09daaca6400854aa7ed72be12d3e5 Mon Sep 17 00:00:00 2001 From: Binara-Sachin Date: Tue, 5 Nov 2024 23:38:48 +0530 Subject: [PATCH] Add null checks --- .../identity/sts/passive/utils/RequestProcessorUtil.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/utils/RequestProcessorUtil.java b/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/utils/RequestProcessorUtil.java index 96ce2637..0f1f9dea 100644 --- a/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/utils/RequestProcessorUtil.java +++ b/components/org.wso2.carbon.identity.sts.passive/src/main/java/org/wso2/carbon/identity/sts/passive/utils/RequestProcessorUtil.java @@ -279,6 +279,11 @@ private static Properties getEncryptionProperties() throws IdentityKeyStoreResol String tenantKeyStoreName = IdentityKeyStoreResolverUtil.buildTenantKeyStoreName(tenantDomain); + if (StringUtils.isEmpty(keyStoreFileLocation) || StringUtils.isEmpty(keyStorePassword)) { + throw new STSException("Error occoured when building encryption properties." + + " One or more keystore properties are null or empty."); + } + Properties properties = new Properties(); properties.put("org.apache.wss4j.crypto.provider",