赞助商

MOST RECENT NEWS - WE MOMENTARILY RENEW

10
        在第一篇,第二篇日志中都没有管openssl\openssl.cnf配置文件中的设置,使用撤销用户证书功能时需要用到。
找到 CA_default 字段处
引用
dir = d:/youpath/ca # Where everything is kept


然后到 d:/youpath/ca 下创建index.txt,certs,crl,newcerts,private,serial,crlnumber 这些文件
将serial,crlnumber的内容都设为默认值01

先撤销用户证书
引用
   openssl ca -keyfile d:\path\bin\cert\ca\ca-key.pem -cert d:\path\bin\cert\ca\ca-cert.pem -revoke d:\path\bin\cert\client\client-cert.pem -config d:\path\bin\cert\openssl\openssl.cnf  


生成供tomcat使用的撤销证书列表
引用
   openssl ca -gencrl -config d:\path\bin\cert\openssl\openssl.cnf -crldays 7 -out d:\path\bin\cert\server\server-cert-list.crl  


修改tomcat conf/server.xml 文件,多了个 crlFile 属性
引用

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxHttpHeaderSize="8192"  
              maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
              enableLookups="false" disableUploadTimeout="true"  
              acceptCount="100" scheme="https" secure="true"  
              sslProtocol="TLS"  
              clientAuth="true" keystoreFile="d:/path/bin/cert/server/server.p12"  
              keystoreType="PKCS12" keystorePass="123456"  
              truststoreFile="d:/path/bin/cert/ca/ca.jks"  
              truststoreType="JKS" truststorePass="123456"
       crlFile="d:/path/bin/cert/server/server-cert-list.crl" />


资料说tomcat中使用撤销证书列表功能,需要编译org.apache.tomcat.util.net.jsse.JSSE15*.java或整个tomcat-util.jar
但在tomcat6中,实际测试时,并不需要编译上述文件,直接添加crlFile到server.xml里,重启服务器即可看到效果。
如果用户证书已被撤销,将提交找不到服务器,无法打开页面。

作者:elliott@博爱老头的草屋
地址:http://www.icnote.com/post/82/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!

0 条评论 to “Tomcat6中启用撤销证书列表功能”

发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称  [注册]
密码  [游客无需密码]
网址
电邮
               

 

©2007-2012 IcNote.COM Theme by Youth work room