Force AXIS client to use TLS

后端 未结 1 1634
挽巷
挽巷 2021-02-10 01:34

How can I force a SOAP Axis client to use TLS instead of SSL? I have this code:

        SOAPMessage soapMessage = MessageFactory.newInstance()
                .c         


        
相关标签:
1条回答
  • 2021-02-10 01:55
    try {
            SSLContext ctx = SSLContext.getInstance("TLSv1.2");
            ctx.init(null, null, null);
            SSLContext.setDefault(ctx);
        } catch (Exception e) {
                System.out.println(e.getMessage());
        }
    

    You can use this code the set the default protocol for SSL to TLS 1.2 and then write your other statements.

    0 讨论(0)
提交回复
热议问题