Last active
June 14, 2017 08:37
-
-
Save Pushpalanka/12d6a90f1d166d7e45d7a93f33d47b53 to your computer and use it in GitHub Desktop.
Setting keystore in WSO2 code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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