How to disable SSLv2 socket protocol in axis

ε祈祈猫儿з 提交于 2019-12-06 14:58:22
Bruno

If you're using Axis 2, you should be able to configure an Apache HttpClient 3.x SecureProtocolSocketFactory (see the Axis 2 documentation on the subject). You should be able to set the enabled protocols in createSocket before returning the socket. (You might also be interested in this question.)

For Axis 1, you should be able to set the axis.socketSecureFactory property to your own class name implementing an Axis SecureSocketFactory and configure the socket in the same way there.

ranganathprn

For Axis 1:

  1. Create your custom MySocketFactory which extends SecureScoketFatory.

    String[] protocols = { "TLSv1" };//provide the list of protocols which you        want to enable
    ((SSLSocket) sslSocket).setEnabledProtocols(protocols);
    
  2. Then at your web service client level provide the System property like below.

    System.setProperty("axis.socketSecureFactory", "com.custom.MySocketFactory");
    
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!