# openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -name server
# keytool -importkeystore -srckeystore server.p12 -srcstoretype PKCS12 -destkeystore server.jks
在:下面添加:
<login-config>
<!-- Authorization setting for SSL -->
<auth-method>CLIENT-CERT</auth-method>
<realm-name>Client Cert Users-only Area</realm-name>
</login-config>
<security-constraint>
<!-- Authorization setting for SSL -->
<web-resource-collection>
<web-resource-name >SSL</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
原文:https://www.cnblogs.com/doraman/p/11419858.html