Hi All,
I am getting MalformedSecuirtyException while I am running the following
code segment . Can anyone please help in this issue?
String sslConnectionURL =
"amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:8672?ssl='true'"
+
"&ssl_cert_alias='RootCA'&trust_store='" + trustStorePath +
"'&trust_store_password='" +
trustStorePassword
+ "'&key_store='" + keyStorePath + "'&key_store_password='" +
keyStorePassword + "''";
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (GeneralSecurityException e) {
log.error("========================= GeneralSecurityException
============");
}
// Now you can access an https URL without having the certificate in
the truststore
try {
URL url = new URL(sslConnectionURL);
} catch (MalformedURLException e) {
log.error("========================= MalformedURLException ============");
}
--
*Regards,*
*T.Pranavan*
*Software Engineering intern, WSO2*
*Mobile - +94775136836*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev