Hi Pravanan, Can you post the stack-trace?
Thanks On Thu, Feb 19, 2015 at 11:26 AM, Pranavan Theivendram <[email protected]> wrote: > 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 <%2B94775136836>* > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Lakshman Udayakantha WSO2 Inc. www.wso2.com lean.enterprise.middleware Mobile: *0711241005*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
