空手道框架中简单 GET 请求的 SSLHandshakeException
SSLHandshakeException for a simple GET request in Karate Framework
我正在尝试为我的项目设置空手道框架。对于简单的 GET 请求,我收到以下 SSLHandshakeException。当我在浏览器中尝试端点时,我得到了正确的响应,但是当我尝试 运行 黄瓜功能文件时,我看到以下错误。我尝试了 configure ssl = true
、configure ssl = 'TLSv1.1'
,但看到相同的错误
10:35:28.886 [main] DEBUG
org.apache.http.conn.ssl.LenientSslConnectionSocketFactory - Starting handshake
10:35:29.003 [main] DEBUG
org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
10:35:29.003 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded
10:35:29.003 [main] DEBUG
org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}-https://hygieia*******.com:443][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
10:35:29.004 [main] ERROR com.intuit.karate -
javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure, http call failed after 446 milliseconds for URL:
https://hygieia******.com/api/dashboard/count
您使用的是 0.6.1 版本,对吧,我真的以为这已经修复了。如果您能帮我弄清楚要进行哪些更改,那就太好了。这是将为您提供所有信息的票证,包括代码更改:https://github.com/intuit/karate/issues/193
这应该有效:如果您在 pom.xml
中使用 karate-apache
切换到 karate-jersey
(反之亦然)- 很可能会有效。
最坏的情况,你可以设置系统属性,让 HTTP 客户端使用你提供的证书,这张票可以给你一些提示:https://github.com/intuit/karate/issues/76
我遵循了
中 jdk8 的说明
我下载了提到的 jars(US_export_policy.jar、local_policy.jar)并将它们复制到 {JAVA_HOME}/jre/lib/security 然后奇迹发生了
@Peter Thomas 感谢您帮助解决这个问题:)
我正在尝试为我的项目设置空手道框架。对于简单的 GET 请求,我收到以下 SSLHandshakeException。当我在浏览器中尝试端点时,我得到了正确的响应,但是当我尝试 运行 黄瓜功能文件时,我看到以下错误。我尝试了 configure ssl = true
、configure ssl = 'TLSv1.1'
,但看到相同的错误
10:35:28.886 [main] DEBUG
org.apache.http.conn.ssl.LenientSslConnectionSocketFactory - Starting handshake
10:35:29.003 [main] DEBUG
org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
10:35:29.003 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded
10:35:29.003 [main] DEBUG
org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}-https://hygieia*******.com:443][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
10:35:29.004 [main] ERROR com.intuit.karate -
javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure, http call failed after 446 milliseconds for URL:
https://hygieia******.com/api/dashboard/count
您使用的是 0.6.1 版本,对吧,我真的以为这已经修复了。如果您能帮我弄清楚要进行哪些更改,那就太好了。这是将为您提供所有信息的票证,包括代码更改:https://github.com/intuit/karate/issues/193
这应该有效:如果您在 pom.xml
中使用 karate-apache
切换到 karate-jersey
(反之亦然)- 很可能会有效。
最坏的情况,你可以设置系统属性,让 HTTP 客户端使用你提供的证书,这张票可以给你一些提示:https://github.com/intuit/karate/issues/76
我遵循了
我下载了提到的 jars(US_export_policy.jar、local_policy.jar)并将它们复制到 {JAVA_HOME}/jre/lib/security 然后奇迹发生了
@Peter Thomas 感谢您帮助解决这个问题:)