Skip to content

Commit

Permalink
Update keystore extension to PKCS12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Jan 19, 2024
1 parent f975f9b commit 0cd1b3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.wso2.carbon.idp.mgt.IdentityProviderManagementException;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.security.KeystoreUtils;

import java.nio.charset.StandardCharsets;
import java.security.Key;
Expand All @@ -58,7 +59,6 @@
public class JWTAuthTokenGenerator implements AuthTokenGenerator {

private static final Log log = LogFactory.getLog(JWTAuthTokenGenerator.class);
private static final String KEY_STORE_EXTENSION = ".jks";
// We are keeping a private key map which will have private key for each tenant domain. We are keeping this as a
// static Map since then we don't need to read the key from keystore every time.
private static Map<Integer, Key> privateKeys = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -187,7 +187,6 @@ private int getTenantId(String tenantDomain) throws AuthAPIServerException {

private String getTenantKeyStoreName(String tenantDomain) {

String ksName = tenantDomain.trim().replace(".", "-");
return ksName + KEY_STORE_EXTENSION;
return KeystoreUtils.getKeyStoreFileLocation(tenantDomain);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
<osgi.framework.imp.pkg.version>[1.7.0, 2.0.0)</osgi.framework.imp.pkg.version>
<osgi.service.component.imp.pkg.version>[1.2.0, 2.0.0)</osgi.service.component.imp.pkg.version>

<carbon.kernel.version>4.6.0</carbon.kernel.version>
<carbon.kernel.version>4.9.23-SNAPSHOT</carbon.kernel.version>
<carbon.kernel.imp.pkg.version>[4.5.0, 5.0.0)</carbon.kernel.imp.pkg.version>
<carbon.identity.framework.version>5.25.28</carbon.identity.framework.version>
<carbon.identity.framework.imp.pkg.version>[5.20.321, 7.0.0)</carbon.identity.framework.imp.pkg.version>
Expand Down

0 comments on commit 0cd1b3a

Please sign in to comment.