Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve keystore configuration retrieval. #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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