經過HTTPClient4.5,基於JDK1.6java
new SSLConnectionSocketFactory(builder.build(), new String[]{"SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.2"}, null, NoopHostnameVerifier.INSTANCE);socket
經查詢發現:oop
TLSv1.2 is supported since Java 7 so not working in Java 6.ui
If you set TLSv1.2 to SSL socket in Java 6 then you will get the exception: improperly. java.lang.IllegalArgumentException: TLSv1.2get
解決方法:io
方法一:修改JDK版本,使用JDK7,8;exception
方法二:將參數TLSv1.2去掉。perl