“SocketException: Unconnected sockets not implemented” with self-signed SSL certificate

前端 未结 6 1122
轮回少年
轮回少年 2021-01-17 19:49

(I\'ve asked the same question of the jmeter-user mailing list, but I wanted to try here as well - so at the least I can update this with the answer once I find it).

6条回答
  •  北海茫月
    2021-01-17 20:30

    Try searching your classpath (in Eclipse, I do ctrl-shift-t to do this) for SSLSocketFactory*. If you find one, set it as a property on the Security class:

    In my environment, I've found the following two:

    Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl");
    

    or

    Security.setProperty("ssl.SocketFactory.provider", "com.ibm.websphere.ssl.protocol.SSLSocketFactory");
    

    (or for whatever other class you find)

    Similarly for ServerSocketFactory, if you need server sockets.

提交回复
热议问题