Skip to content

Commit 7754965

Browse files
committed
Add method to retrieve keystore file location based on context
1 parent 61eeefe commit 7754965

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/security/KeystoreUtils.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,17 @@ public static String getKeyStoreFileLocation(String tenantDomain) {
134134
return tenantDomain.trim().replace(".", "-") + getKeyStoreFileExtension(tenantDomain);
135135
}
136136

137+
/**
138+
* Retrieve keystore file location for a given context.
139+
* This won't consider the server configuration for super tenant as the context is provided.
140+
*
141+
* @return File location.
142+
*/
143+
public static String getKeyStoreFileLocation(String context, String tenantDomain) {
144+
145+
return tenantDomain.trim().replace(".", "-") + "--" + context + getKeyStoreFileExtension(tenantDomain);
146+
}
147+
137148
/**
138149
* Retrieve keystore file type (ex: JKS, PKCS12).
139150
* @param tenantDomain Tenant domain the keystore need to be resolved.

0 commit comments

Comments
 (0)