【问题标题】:Not able to connect with HTTPS无法使用 HTTPS 连接
【发布时间】:2017-11-04 21:26:22
【问题描述】:

我已经在 java 中创建了我的 Rest API,并且可以正常使用 HTTP。但为了确保运输安全,我在 eclipse 中对 server.xml 文件进行了一些更改。

首先我为此创建了自签名证书和密码,并在 server.xml 文件中提到了该信息,如下所示(全部在 Windows 7 中完成)

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS"
           keystoreFile="E:\\SSL\\Certificate.pfx" keystorePass="Certificate123" />

但仍然无法使用 HTTPS 连接网络服务器。

谁能告诉我这里做错了什么?

【问题讨论】:

    标签: java windows rest ssl https


    【解决方案1】:

    您似乎正在使用 apache-tomact,而且您似乎已经创建了 pkcs12 格式的密钥库。

    尝试将keystoreType="PKCS12" 属性添加到connector 元素。

    您可以找到更多详细信息here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-18
      • 1970-01-01
      • 2018-08-31
      • 2017-07-13
      相关资源
      最近更新 更多