IBM Worklight Server 6.1 - 后端适配器 - javax.net.ssl.SSLException:证书中的主机名不匹配

时间:2014-02-11 22:37:33

标签: ssl ibm-mobilefirst worklight-adapters worklight-security

我正在使用Worklight 6.0.1。我在验证证书时遇到问题。我可以以某种方式删除PoC项目的适配器中的证书检查吗?

我无法在Worklight服务器上快速安装正确的证书。这个答案没有提供正确的答案:Disabling certificate hostname verification

[ERROR   ] FWLSE0099E: An error occurred while invoking procedure  [project POD]html/HttpRequestFWLSE0100E:  parameters: [project POD]{
   "arr": [
      {
         "method": "get",
         "path": "mobile",
         "returnedContentType": "html"
      }
   ]
}

Http request failed: javax.net.ssl.SSLException: hostname in certificate didn't match: <xxx> != <xxx> OR <xxx>
FWLSE0101E: Caused by:  [project POD]javax.net.ssl.SSLException: hostname in certificate didn't match: <xxx> != <xxx> OR <xxx>java.lang.RuntimeException: Http request failed: javax.net.ssl.SSLException: hostname in certificate didn't match: <xxx> != <xxx> OR <xxx>
       at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:241)
       at com.worklight.adapters.http.HttpClientContext.doExecute(HttpClientContext.java:176)
       at com.worklight.adapters.http.HttpClientContext.execute(HttpClientContext.java:160)

1 个答案:

答案 0 :(得分:0)

我的理解是您在适配器中使用WL.Server.invokeHttp来调用后端https服务吗?

没有开箱即用的选项可以从这些调用中删除证书验证。如果在适配器配置中指定https协议,则必须使用有效的https配置。

一种解决方法是在worklight服务器中使用java实现您自己的https调用,并从适配器调用它。但是这样你就会跳过worklight http适配器的一个值,也许它会耗费更多的时间去做POC。