Skip to content

Commit

Permalink
🐛 #1724 微信支付证书初始化代码去掉不推荐的TLSv1协议,解决退款接口报No appropriate protocol的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
missionOdd authored Aug 22, 2020
1 parent 6f95386 commit c1c66e9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.http.util.EntityUtils;

import javax.net.ssl.SSLContext;
import java.math.BigInteger;
import java.net.URI;
import java.nio.charset.StandardCharsets;

Expand Down Expand Up @@ -262,7 +261,7 @@ private void initSSLContext(HttpClientBuilder httpClientBuilder) throws WxPayExc
}

SSLConnectionSocketFactory connectionSocketFactory = new SSLConnectionSocketFactory(sslContext,
new String[]{"TLSv1"}, null, new DefaultHostnameVerifier());
new DefaultHostnameVerifier());
httpClientBuilder.setSSLSocketFactory(connectionSocketFactory);
}

Expand Down

0 comments on commit c1c66e9

Please sign in to comment.