Skip to content

Instantly share code, notes, and snippets.

@Pushpalanka
Last active June 14, 2017 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pushpalanka/12d6a90f1d166d7e45d7a93f33d47b53 to your computer and use it in GitHub Desktop.
Save Pushpalanka/12d6a90f1d166d7e45d7a93f33d47b53 to your computer and use it in GitHub Desktop.
Setting keystore in WSO2 code
//Path to Java Key Store (JKS) which is a portable repository of X.509 certificates
//and private keys for encrypting and signing some thing with the private key
String path = "/home/pushpalanka/Installations/wso2is-3.0.1/resources/security/" + "wso2carbon.jks";
//Store of CA certificates to trust. Required to authenticate remote servers
System.setProperty("javax.net.ssl.trustStore", path);
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
try {
//Create a configuration context. A configuration context contains information
//for a axis2 environment.
configCtx = ConfigurationContextFactory.createConfigurationContextFromFileSyste(null, null);
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment