在ContainerRequestFilter
中,我试图读取客户的自签名证书,但我得到的是空值。
Java:
X509Certificate[] certificates = (X509Certificate[]) requestContext.getProperty("javax.servlet.request.X509Certificate");
Tomee server.xml:
<Connector port="8443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https"
secure="true" maxPostSize="100000"
>
<SSLHostConfig
certificateVerification="optionalNoCA"
truststoreFile="/my/java/cacerts"
truststorePassword="changeit"
>
<Certificate
certificateKeyAlias="myalias"
certificateKeystoreFile="/my/keystore/filepath"
certificateKeystorePassword="changeit"
certificateKeystoreType="JKS" >
</Certificate>
</SSLHostConfig>
我缺少什么配置?