Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
去掉不推荐TLSv1的协议,解决退款接口No appropriate protocol报错
  • Loading branch information
missionOdd committed Aug 20, 2020
commit ddfe9fcb0d5e50b909637f3f7d5f5e8e6289118e
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