且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

强制AXIS客户端使用TLS

更新时间:2022-06-10 22:15:47

try {
        SSLContext ctx = SSLContext.getInstance("TLSv1.2");
        ctx.init(null, null, null);
        SSLContext.setDefault(ctx);
    } catch (Exception e) {
            System.out.println(e.getMessage());
    }

您可以使用此代码将SSL的默认协议设置为TLS 1.2和然后写下你的其他陈述。

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