admin管理员组

文章数量:1530842

目录

    • 1.修改JRE中 java.security的TLS禁用策略
    • 2.修改微信提供的代码(已解决)
    • 3.JDK版本问题

进行微信支付退款测试的时候,在本地一切运行正常,当部署到服务器时,复测就出现问题,通过查找日志发现:

[ERROR][10:10:33] ClientCustomSSL:87 No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
	at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
	at sun.security.ssl.TransportContext.kickstart(TransportContext.java:220)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:428)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:395)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:354)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)

1.修改JRE中 java.security的TLS禁用策略

看到网上大多数都是这种解决方案,但是我试过了不行(pass)

  1. 查找 java.security文件
  • which java
  • ls -lrt /usr/bin/java
  • ls -lrt /etc/alternatives/java
  1. 修改java.security(标注的地方去掉)

2.修改微信提供的代码(已解决)

将标注的地方直接改为null

3.JDK版本问题

重新安装JDK,如果还不行,继续执行步骤1

本文标签: disabledprotocolcipherinappropriatesuites