我使用 url 访问我的应用程序,即https://myIPAddress:8443/myWebApp/
我创建了myWebApp.xml
包含以下上下文元素的文件并将其放在<tomcat_home>\conf\Catalina\localhost\
<Context>
<Valve className="org.apache.catalina.authenticator.MySSLAuthenticator"/>
</Context>
MySSLAuthenticator.class 位于 jar 文件下,该文件位于<tomcat_home>\lib
但看起来 MySSLAuthenticator 并没有出现,因为我得到以下错误,我看到 SSLAuthenticator 的实例不是 MySSLAuthenticator
javax.net.ssl.SSLHandshakeException: null cert chain
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1884)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:266)
at sun.security.ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1631)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:176)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.tomcat.util.net.jsse.JSSESupport.handShake(JSSESupport.java:181)
at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:148)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1120)
at org.apache.coyote.Request.action(Request.java:349)
at org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:135)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
我不确定这里缺少什么?tomcat 版本是 6.0.35