我有问题,谷歌浏览器显示:
The site uses SSL, but Google Chrome has detected either high-risk insecure content on the page or problems with the site’s certificate. Don’t enter sensitive information on this page. Invalid certificate or other serious https issues could indicate that someone is attempting to tamper with your connection to the site.
消息显示与红色https标志交叉。
我找到了这个链接,但无法从中找到解决方法: http://code.google.com/p/chromium/issues/detail?id=72716
还提到了APR的OpenSSL问题(什么是OpenSSL替代方案?):
http://tomcat.apache.org/security-native.html
我拥有GeoTrust商业ID证书,这对于网站来说已经足够了,应该足够安全。所以我认为这与Tomcat或Java有关。
server.xml中的工作配置:
<Connector port="443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
maxHttpHeaderSize="16384"
maxThreads="150"
minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false"
acceptCount="100"
connectionTimeout="20000"
disableUploadTimeout="true"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"
scheme="https"
secure="true"
SSLEnabled="true"
sslProtocol="TLS"
clientAuth="false"
keystoreFile="/usr/share/tomcat6/conf/tomcat.keystore" keystorePass="somepass"
/>
在图片上给出了错误:
`<Connector port="443"`
protocol="org.apache.coyote.http11.Http11AprProtocol"
maxHttpHeaderSize="16384"
maxThreads="150"
enableLookups="false"
acceptCount="100"
disableUploadTimeout="true"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"
scheme="https"
secure="true"
SSLEnabled="true"
SSLCertificateFile="/tomcat/conf/cert.crt"
SSLCertificateKeyFile="/tomcat/conf/key.pem"
SSLCACertificateFile="/tomcat/conf/rootandintermidiate.crt"
clientAuth="optional"
/>
这似乎可以解决问题!
答案 0 :(得分:1)
根据:
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
“APR连接器使用不同的 SSL密钥和的属性 证书“。
他们给出的例子是(JSSE):
<Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
对于JSSE,然后是APR:
<Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
SSLCertificateFile="/usr/local/ssl/server.crt"
SSLCertificateKeyFile="/usr/local/ssl/server.pem"
clientAuth="optional" SSLProtocol="TLSv1"/>
我注意到的第一件事是SSLProtocol
是不同的(属性及其值),它不使用keystoreFile
。这似乎是因为:
“如果安装使用APR - 即 您已经安装了Tomcat本机 库 - 然后它将使用APR SSL 实施“。
示例中的属性与JSSE实现有关,因此我假设该问题与使用NIO协议和/或APR有关。更改您的Connector
以使用专为APR设计的属性并删除JSSE(或反之亦然)。