diff --git a/components/carbon-transports/websocket/org.wso2.carbon.websocket.transport/src/main/java/org/wso2/carbon/websocket/transport/utils/SSLUtil.java b/components/carbon-transports/websocket/org.wso2.carbon.websocket.transport/src/main/java/org/wso2/carbon/websocket/transport/utils/SSLUtil.java index a2d4a5d882f..d94f2dfc015 100644 --- a/components/carbon-transports/websocket/org.wso2.carbon.websocket.transport/src/main/java/org/wso2/carbon/websocket/transport/utils/SSLUtil.java +++ b/components/carbon-transports/websocket/org.wso2.carbon.websocket.transport/src/main/java/org/wso2/carbon/websocket/transport/utils/SSLUtil.java @@ -53,7 +53,7 @@ public static SSLContext createServerSSLContext(final String keyStoreLocation, KeyStore keyStore = KeyStore.getInstance(KEY_STORE_TYPE); keyStore.load(new FileInputStream(keyStoreLocation), keyStorePwd.toCharArray()); KeyManagerFactory keyManagerFactory = - KeyManagerFactory.getInstance(KEY_MANAGER_TYPE); + KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); keyManagerFactory.init(keyStore, keyStorePwd.toCharArray()); serverSSLCtx = SSLContext.getInstance(PROTOCOL); serverSSLCtx.init(keyManagerFactory.getKeyManagers(), null, null); @@ -85,7 +85,7 @@ public static SSLContext createClientSSLContext(final String trustStoreLocation, trustStore.load(new FileInputStream(trustStoreLocation), trustStorePwd.toCharArray()); TrustManagerFactory trustManagerFactory = - TrustManagerFactory.getInstance(TRUST_MANAGER_TYPE); + TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init(trustStore); clientSSLCtx = SSLContext.getInstance(PROTOCOL); clientSSLCtx.init(null, trustManagerFactory.getTrustManagers(), null); @@ -116,7 +116,7 @@ public static TrustManagerFactory createTrustmanager(final String trustStoreLoca KeyStore trustStore = KeyStore.getInstance(TRUST_STORE_TYPE); trustStore.load(new FileInputStream(trustStoreLocation), trustStorePwd.toCharArray()); - trustManagerFactory = TrustManagerFactory.getInstance(TRUST_MANAGER_TYPE); + trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); trustManagerFactory.init(trustStore); // clientSSLCtx = SSLContext.getInstance(PROTOCOL); // clientSSLCtx.init(null,