weblogic 12.1.2 JDK 1.6 SSL 握手失败

问题描述

在使用 weblogic 12.1.2 配置单向 https 后, 通过浏览器能够正常访问 weblogic, 如果通过反向
代理(Nginx)访问或者通过 openssl 进行故障分析都会报:SSL 握手失败, 将 weblogic JDK 从 1.6 更改为 1.7 则没有此问题, 使用 Tomcat6.0.45 JDK 1.6 也配置单向 https 没有此类问题。

Nginx 报错如下:

peer closed connection in SSL handshake while SSL handshaking to upstream, client: 192.168.7.163, server: 192.168.7.163, request: "GET /portal/getServerTime.do HTTP/1.1", upstream:

openssl 故障分析报错:

C:\OpenSSL\bin>openssl s_client -tls1_2 -state -connect 192.168.7.163:20021
CONNECTED(0000018C)
SSL_connect:before/connect initialization
SSL_connect:SSLv3 write client hello A
SSL_connect:failed in SSLv3 read server hello A
9596:error:1409E0E5:SSL routines:ssl3_write_bytes:ssl handshake failure:s3_pkt.c:656:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1515639299
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---

这个问题百度、谷歌都找了没找到原因,希望有人能为我解惑,我将感激不尽,Thanks♪(・ω・)ノ

阅读 4.3k
1 个回答

问题找到了, 过程如下:首先使用如下参数开启 weblogic SSL 调试:

-Dweblogic.security.SSL.verbose=true 
-Dssl.debug=true 
-Dweblogic.StdoutDebugEnabled=true

在请求 weblogic weblogic 日志中有如下信息:

java.security.InvalidAlgorithmParameterException: parameter object not a ECParameterSpec
java.lang.RuntimeException: Could not generate DH keypair

经过 google 发现可以通过禁用 jdk 的 ecc(Elliptic Curve Cryptography) 算法解决

-Dcom.sun.net.ssl.enableECC=false
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题