【问题标题】:SSL error in Ubuntu and TomcatUbuntu 和 Tomcat 中的 SSL 错误
【发布时间】:2011-09-14 10:52:46
【问题描述】:

我是 SSL 新手,正在尝试在 Tomcat 中启用它,但在访问 https://localhost:8443/ 时,firefox 出现以下错误:

An error occurred during a connection to localhost:8443.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)   

*   The page you are trying to view can not be shown because the authenticity of the received data could not be verified.

*   Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

密钥类型为 PKCS12,格式为 .pfx,由我当地的银行办公室生成,以备将来使用。

Tomcat server.xml:

<Connector port="8443"
           maxHttpHeaderSize="8192"
           maxThreads="150"
           minSpareThreads="25"
           maxSpareThreads="75"
           enableLookups="false"
           disableUploadTimeout="true"
           acceptCount="100"
           scheme="https"
           secure="true"
           clientAuth="false"
           sslProtocol="TLS"
           keystoreFile="key.pfx"
           keystorePass="mypassword"
           keystoreType="PKCS12"/>

【问题讨论】:

    标签: tomcat ssl


    【解决方案1】:

    Tomcat 6 需要将 Connector 标记的参数 SSLEnabled 设置为 true,才能启用 SSL。这很可能是 Firefox 报告错误的原因,因为它可能在响应中接收 HTML 文档并尝试从中读取假定的 SSL 有效负载。

    【讨论】:

    • 我已启用它,但现在我收到此错误:证书类型未批准申请。 (错误代码:sec_error_inadequate_cert_type)
    • @hoss,这很简单。似乎是the list of allowed activities for the certificate 的问题。如果可以,您可能必须重新生成证书。或者发行一个新的。
    • 我在 Windows 中通过 certmgr.msc 重新生成了它,但没有运气:(
    • 当您查看证书的属性时,您是否看到它允许“服务器身份验证”?
    • 在“Enhaced Key Usage”下我只看到“Client Authentication”
    猜你喜欢
    • 2023-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-05
    • 1970-01-01
    • 1970-01-01
    • 2018-09-07
    • 1970-01-01
    相关资源
    最近更新 更多