System.setProperty("javax.net.ssl.trustStore", trustStoreFilePath.getPath());
System.setProperty("javax.net.ssl.trustStorePassword", truststorePassword);
System.setProperty("javax.net.ssl.keyStore", keyStoreFilePath.getPath());
System.setProperty("javax.net.ssl.keyStorePassword", keystorePassword);https://xxxxxx.net/api/v1/login上调用REST添加并尝试以下选项- karate.configure(' ssl ',true);-*配置ssl= true
我的错误越来越少-
admin_login.feature
21:43:28.106 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, http call failed after 943 milliseconds for URL: https://xxxxxx.net/api/v1/login
21:43:28.107 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - http request failed:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
21:43:28.114 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - feature call failed: classpath:admin_login.feature
arg: [object Object]
admin_login.feature:8 -
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
21:43:28.116 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - javascript function call failed:
admin_login.feature:8 -
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target发布于 2019-07-20 16:59:45
SSL可能很棘手,您可能需要时间和耐心。
通常,* configure ssl = true应该只在空手道中工作,因为它将禁用证书验证。听起来,这里你已经设置了一些系统属性,这些属性也是由空手道获得的。参考https://github.com/intuit/karate#system-properties-for-ssl-and-http-proxy
所以,如果您使用configure ssl,您可以让它工作。
请记住,如果仍然被困,需要更多的支持,请按以下说明操作:https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
https://stackoverflow.com/questions/57126580
复制相似问题