java - SSL Servlet 实现问题 : received a record that exceeded the maximum permissible length

标签 java servlets security keystore

我在应用程序中使用 SSL 时遇到问题。我做了以下事情:

我将以下段落添加到我的安全约束标签中:

 <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>

并在 Tomcat 的 Server.xml 中添加以下内容

<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:/keystore.key"
keystorePass="mypassword" />

现在

https://localhost:8443/Appname/page.jsp

我得到以下信息

Secure Connection Failed
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 cannot be shown because the authenticity of the received data could not be verified.
  Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

有什么建议吗?

最佳答案

您必须设置 SSLEnabled to true on your connector .

<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="c:/keystore.key"
keystorePass="mypassword"
SSLEnabled="true" />

关于java - SSL Servlet 实现问题 : received a record that exceeded the maximum permissible length,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11240885/

相关文章:

java - 浏览器是否为所有页面请求发送 PAGE-REQUEST 作为 "GET"http 方法?

jsp - 尽管在 web.xml 中配置了异常类型,但仍未显示错误页面

java - 在 java servlet 中运行读取和写入外部文本文件的应用程序

c# - 我可以使用 SQL Server 安全性来控制对我的(数据库优先)ASP.net 应用程序的访问吗?如何?

azure - 相当于使用 Azure Blob 存储的基于 S3 浏览器的 POST 策略吗?

java - Spring AMQP Rabbit - 单个消费者监听多个队列 - 交付顺序是什么?

java - @JoinTable 是否应该在@ManyToMany 关系的两边指定?

java - 将准备好的语句存储为静态成员

java - Google Guice 和 JPA 注入(inject) - 奇怪的错误

azure - 您可以将azureml Rest端点从公共(public)更改为私有(private)吗