我正在尝试在调试日志下面发出REST post调用。我尝试了不同的东西 - 信任许多不同风格的所有证书,将证书上传到java cacerts(JVM在加载时将证书显示为可信任)但是我仍然成为failure_shake错误。以下代码是否为您提供了可能出现问题的任何提示?使用Java 8.
17:48:20,407 INFO [stdout] (EE-ManagedExecutorSe) Allow unsafe renegotiation: false
17:48:20,408 INFO [stdout] (EE-ManagedExecutorSe) Allow legacy hello messages: true
17:48:20,408 INFO [stdout] (EE-ManagedExecutorSe) Is initial handshake: true
17:48:20,408 INFO [stdout] (EE-ManagedExecutorSe) Is secure renegotiation: false
17:48:20,408 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,409 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,410 INFO [stdout] (EE-ManagedExecutorSe) Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1.1
17:48:20,410 INFO [stdout] (EE-ManagedExecutorSe) %% No cached client session
17:48:20,411 INFO [stdout] (EE-ManagedExecutorSe) *** ClientHello, TLSv1.2
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) RandomCookie: GMT: 1489577284 bytes = { 190, 239, 160, 238, 219, 146, 107, 74, 212, 142, 50, 30, 46, 16, 22, 132, 107, 209, 133, 30, 149, 116, 80, 146, 179, 140, 156, 58 }
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Session ID: {}
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Compression Methods: { 0 }
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Extension elliptic_curves, curve names: {secp256r1, secp384r1, secp521r1, sect283k1, sect283r1, sect409k1, sect409r1, sect571k1, sect571r1, secp256k1}
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Extension ec_point_formats, formats: [uncompressed]
17:48:20,414 INFO [stdout] (EE-ManagedExecutorSe) Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA256withDSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
17:48:20,415 INFO [stdout] (EE-ManagedExecutorSe) Extension server_name, server_name: [type=host_name (0), value=media.josera.org]
17:48:20,415 INFO [stdout] (EE-ManagedExecutorSe) ***
17:48:20,415 INFO [stdout] (EE-ManagedExecutorSe) [write] MD5 and SHA1 hashes: len = 186
17:48:20,417 INFO [stdout] (EE-ManagedExecutorSe) 0000: 01 00 00 B6 03 03 59 C9 25 44 BE EF A0 EE DB 92 ......Y.%D......
17:48:20,420 INFO [stdout] (EE-ManagedExecutorSe) 0010: 6B 4A D4 8E 32 1E 2E 10 16 84 6B D1 85 1E 95 74 kJ..2.....k....t
17:48:20,423 INFO [stdout] (EE-ManagedExecutorSe) 0020: 50 92 B3 8C 9C 3A 00 00 3A C0 23 C0 27 00 3C C0 P....:..:.#.'.<.
17:48:20,426 INFO [stdout] (EE-ManagedExecutorSe) 0030: 25 C0 29 00 67 00 40 C0 09 C0 13 00 2F C0 04 C0 %.).g.@...../...
17:48:20,429 INFO [stdout] (EE-ManagedExecutorSe) 0040: 0E 00 33 00 32 C0 2B C0 2F 00 9C C0 2D C0 31 00 ..3.2.+./...-.1.
17:48:20,433 INFO [stdout] (EE-ManagedExecutorSe) 0050: 9E 00 A2 C0 08 C0 12 00 0A C0 03 C0 0D 00 16 00 ................
17:48:20,436 INFO [stdout] (EE-ManagedExecutorSe) 0060: 13 00 FF 01 00 00 53 00 0A 00 16 00 14 00 17 00 ......S.........
17:48:20,439 INFO [stdout] (EE-ManagedExecutorSe) 0070: 18 00 19 00 09 00 0A 00 0B 00 0C 00 0D 00 0E 00 ................
17:48:20,442 INFO [stdout] (EE-ManagedExecutorSe) 0080: 16 00 0B 00 02 01 00 00 0D 00 16 00 14 06 03 06 ................
17:48:20,445 INFO [stdout] (EE-ManagedExecutorSe) 0090: 01 05 03 05 01 04 03 04 01 04 02 02 03 02 01 02 ................
17:48:20,448 INFO [stdout] (EE-ManagedExecutorSe) 00A0: 02 00 00 00 15 00 13 00 00 10 6D 65 64 69 61 2E ..........media.
17:48:20,450 INFO [stdout] (EE-ManagedExecutorSe) 00B0: 6A 6F 73 65 72 61 2E 6F 72 67 josera.org
17:48:20,450 INFO [stdout] (EE-ManagedExecutorSe) EE-ManagedExecutorService-default-Thread-2, WRITE: TLSv1.2 Handshake, length = 186
17:48:20,450 INFO [stdout] (EE-ManagedExecutorSe) [Raw write]: length = 191
17:48:20,453 INFO [stdout] (EE-ManagedExecutorSe) 0000: 16 03 03 00 BA 01 00 00 B6 03 03 59 C9 25 44 BE ...........Y.%D.
17:48:20,456 INFO [stdout] (EE-ManagedExecutorSe) 0010: EF A0 EE DB 92 6B 4A D4 8E 32 1E 2E 10 16 84 6B .....kJ..2.....k
17:48:20,459 INFO [stdout] (EE-ManagedExecutorSe) 0020: D1 85 1E 95 74 50 92 B3 8C 9C 3A 00 00 3A C0 23 ....tP....:..:.#
17:48:20,462 INFO [stdout] (EE-ManagedExecutorSe) 0030: C0 27 00 3C C0 25 C0 29 00 67 00 40 C0 09 C0 13 .'.<.%.).g.@....
17:48:20,464 INFO [stdout] (EE-ManagedExecutorSe) 0040: 00 2F C0 04 C0 0E 00 33 00 32 C0 2B C0 2F 00 9C ./.....3.2.+./..
17:48:20,467 INFO [stdout] (EE-ManagedExecutorSe) 0050: C0 2D C0 31 00 9E 00 A2 C0 08 C0 12 00 0A C0 03 .-.1............
17:48:20,471 INFO [stdout] (EE-ManagedExecutorSe) 0060: C0 0D 00 16 00 13 00 FF 01 00 00 53 00 0A 00 16 ...........S....
17:48:20,473 INFO [stdout] (EE-ManagedExecutorSe) 0070: 00 14 00 17 00 18 00 19 00 09 00 0A 00 0B 00 0C ................
17:48:20,476 INFO [stdout] (EE-ManagedExecutorSe) 0080: 00 0D 00 0E 00 16 00 0B 00 02 01 00 00 0D 00 16 ................
17:48:20,479 INFO [stdout] (EE-ManagedExecutorSe) 0090: 00 14 06 03 06 01 05 03 05 01 04 03 04 01 04 02 ................
17:48:20,481 INFO [stdout] (EE-ManagedExecutorSe) 00A0: 02 03 02 01 02 02 00 00 00 15 00 13 00 00 10 6D ...............m
17:48:20,484 INFO [stdout] (EE-ManagedExecutorSe) 00B0: 65 64 69 61 2E 6A 6F 73 65 72 61 2E 6F 72 67 edia.josera.org
17:48:20,686 INFO [stdout] (EE-ManagedExecutorSe) [Raw read]: length = 5
17:48:20,687 INFO [stdout] (EE-ManagedExecutorSe) 0000: 15 03 03 00 02 .....
17:48:20,688 INFO [stdout] (EE-ManagedExecutorSe) [Raw read]: length = 2
17:48:20,689 INFO [stdout] (EE-ManagedExecutorSe) 0000: 02 28 .(
17:48:20,689 INFO [stdout] (EE-ManagedExecutorSe) EE-ManagedExecutorService-default-Thread-2, READ: TLSv1.2 Alert, length = 2
17:48:20,689 INFO [stdout] (EE-ManagedExecutorSe) EE-ManagedExecutorService-default-Thread-2, RECV TLSv1.2 ALERT: fatal, handshake_failure
17:48:20,689 INFO [stdout] (EE-ManagedExecutorSe) EE-ManagedExecutorService-default-Thread-2, called closeSocket()
17:48:20,690 INFO [stdout] (EE-ManagedExecutorSe) EE-ManagedExecutorService-default-Thread-2, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
17:48:22,520 ERROR [stderr] (EE-ManagedExecutorSe) javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
17:48:22,520 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
17:48:22,521 ERROR [stderr] (EE-ManagedExecutorSe) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
17:48:22,522 ERROR [stderr] (EE-ManagedExecutorSe) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
17:48:22,522 ERROR [stderr] (EE-ManagedExecutorSe) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
答案 0 :(得分:0)
解决了这个问题 - 用更强的加密技术为Java 8下载了jre安全jar。