Skip to content

Commit

Permalink
Improve keystore configuration retrieval.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Feb 1, 2024
1 parent 34180e8 commit 944e893
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
package org.wso2.carbon.registry.event.core.qpid;

import org.wso2.carbon.utils.ServerConstants;
import org.wso2.carbon.utils.security.KeystoreUtils;

public class QpidServerDetails {

private static final String DOMAIN_NAME_SEPARATOR = "@";
private static final String DOMAIN_NAME_SEPARATOR_INTERNAL = "!";

private static final String SECURITY_RESOURCES_DIR = "/repository/resources/security/";
private static final String KEYSTORE_FILE = "wso2carbon.jks";
private static final String TRUSTSTORE_FILE = "client-truststore.jks";
private static final String KEYSTORE_FILE = KeystoreUtils.StoreFileType.defaultFileType();
private static final String TRUSTSTORE_FILE = KeystoreUtils.getTrustStoreFileType();

private String accessKey;
private String clientID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.ui</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
import org.wso2.carbon.registry.ws.stub.xsd.WSTag;
import org.wso2.carbon.registry.ws.stub.xsd.WSTaggedResourcePath;
import org.wso2.carbon.utils.CarbonUtils;
import org.wso2.carbon.utils.security.KeystoreUtils;


import javax.activation.DataHandler;
import javax.activation.FileDataSource;
Expand Down Expand Up @@ -238,7 +240,8 @@ public void addSecurityOptions ( String policyPath, String keyStore,String userN
Policy policy = loadPolicy(policyPath);

Properties merlinProp = new Properties();
merlinProp.put("org.apache.ws.security.crypto.merlin.keystore.type", "JKS");
merlinProp.put("org.apache.ws.security.crypto.merlin.keystore.type",
KeystoreUtils.StoreFileType.defaultFileType());
merlinProp.put("org.apache.ws.security.crypto.merlin.file",
keyStore);

Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,10 @@
<artifactId>org.apache.felix.scr.ds-annotations</artifactId>
<version>${apache.felix.scr.ds.annotations.version}</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -1594,7 +1598,7 @@
<properties>
<!-- Carbon platform version comes here-->

<carbon.kernel.version>4.5.3</carbon.kernel.version>
<carbon.kernel.version>4.9.23</carbon.kernel.version>
<carbon.kernel.feature.version>${carbon.kernel.version}</carbon.kernel.feature.version>
<carbon.kernel.package.import.version.range>[4.5.0, 5.0.0)</carbon.kernel.package.import.version.range>

Expand Down

0 comments on commit 944e893

Please sign in to comment.