Skip to content

Commit c1c66e9

Browse files
authored
🐛 #1724 微信支付证书初始化代码去掉不推荐的TLSv1协议,解决退款接口报No appropriate protocol的问题
1 parent 6f95386 commit c1c66e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.apache.http.util.EntityUtils;
2828

2929
import javax.net.ssl.SSLContext;
30-
import java.math.BigInteger;
3130
import java.net.URI;
3231
import java.nio.charset.StandardCharsets;
3332

@@ -262,7 +261,7 @@ private void initSSLContext(HttpClientBuilder httpClientBuilder) throws WxPayExc
262261
}
263262

264263
SSLConnectionSocketFactory connectionSocketFactory = new SSLConnectionSocketFactory(sslContext,
265-
new String[]{"TLSv1"}, null, new DefaultHostnameVerifier());
264+
new DefaultHostnameVerifier());
266265
httpClientBuilder.setSSLSocketFactory(connectionSocketFactory);
267266
}
268267

0 commit comments

Comments
 (0)