【问题标题】:IBM WAS HTTPS connection certificate chain errorIBM WAS HTTPS 连接证书链错误
【发布时间】:2017-07-06 08:20:52
【问题描述】:

我有 IBM WAS 8.5.5.9 ND 和 MS Exchange 服务器,我尝试使用 EWS Java API 访问它们。部署管理器设置在一台机器上,我的带有 java 应用程序的应用服务器在另一台机器上运行。

         ExchangeService service = new ExchangeService();
         ExchangeCredentials credentials = new WebCredentials("username", "password", "host");
         service.setCredentials(credentials);
         service.setUrl(URI.create("https://xxxxxxxxx/EWS/Exchange.asmx"));

         List msgList = new ArrayList();

         Folder folder = Folder.bind(service, WellKnownFolderName.Inbox);
         FindItemsResults results = service.findItems(folder.getId(), new ItemView(5));
         List items = results.getItems();

         service.close();

但我的应用无法访问 MS Exchange。 HTTPS 连接问题:

The request failed. The request failed. com.ibm.jsse2.util.j: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is: 
            java.security.cert.CertPathValidatorException: The certificate issued by CN=XXX Root CA, O=XXX, C=ES is not trusted; internal cause is: 
            java.security.cert.CertPathValidatorException: Certificate chaining error

我创建了这个 IBM 指南 (http://www-01.ibm.com/support/docview.wss?uid=swg21592616)。

我从我可以访问 OWA 的 Firefox 浏览器下载了根证书和中间证书。将它们安装在 NodeDefaultTrustStore 甚至 CellDefaultTrustStore 中,重新加载我的应用服务器,并在其上运行 java EWS API。但是还是有这个问题。

我做错了什么?也许我错过了什么?这个问题是否与 IBW WAS 和信任库设置有关,还是我的证书有误?我应该将此证书添加到 java 信任库吗?添加歌手证书时 Alias 字段的值是否重要(我为我的中间证书设置了别名值而不是 trusted)?

【问题讨论】:

    标签: java https ssl-certificate websphere


    【解决方案1】:

    为了解决这个问题,我还必须在 java 信任库中添加根证书和中间证书

    【讨论】:

      猜你喜欢
      • 2020-04-04
      • 2017-03-28
      • 1970-01-01
      • 2021-12-12
      • 1970-01-01
      • 2021-04-04
      • 1970-01-01
      • 1970-01-01
      • 2011-08-19
      相关资源
      最近更新 更多