shikhar97gupta commented on code in PR #8896: URL: https://github.com/apache/camel/pull/8896#discussion_r1067250155
########## components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientConnection.java: ########## @@ -69,8 +73,16 @@ public AS2ClientConnection(String as2Version, String userAgent, String clientFqd .add(new RequestExpectContinue(true)).build(); // Create Socket - Socket socket = new Socket(targetHost.getHostName(), targetHost.getPort()); - + //Socket socket = new Socket(targetHost.getHostName(), targetHost.getPort()); + + if (sslContext==null) { + socket = new Socket(targetHost.getHostName(), targetHost.getPort()); + } else { + SSLSocketFactory factory = sslContext.getSocketFactory(); + socket = (SSLSocket) factory.createSocket(targetHost.getHostName(), targetHost.getPort()); + //socket.setEnabledProtocols(new String[]{"TLSv1.3"}); Review Comment: I was having some issues with setting up KeyStore/ TrustStore and got handshake failed error. So I tried changing allowed protocol to only TLSv1.3. Did not need it though, so I commented it at that time and forgot to remove this line. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org