Tomcat6配置使用SSL双向认证
上一篇 / 下一篇 2009-07-17 01:04:04 / 个人分类:JAVA学习&编程相关
TAG:
- 引用 删除 ljonathan / 2009-07-17 01:17:25
-
1) 进入到证书的目录:
E:\java\jdk16\jre\lib\security
2) 在其下执行命令:
keytool -genkey -alias tomcat -keystore ktomcat.keystore
keytool -export -alias tomcat -keystore ktomcat.keystore -file tomcat.crt
keytool -import -alias tomcat -file tomcat.crt -keystore tclient.keystore
3) 修改server.xml
<Connector
port="8443" protocol="HTTP/1.1" minSpareThreads="5" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="E:\java\jdk16\jre\lib\security\ktomcat.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
4) 修改 system.properties
#---------------------------------------------------------------------------
# SSL configuration
#---------------------------------------------------------------------------
#Classname of the ssl provider to be used (to enable testing of https urls)
#And the package name where Stream Handlers can be found
#These provided defaults can be uncommented, and they will work if you are using
#Sun's JSSE implementation.
ssl.provider=com.sun.net.ssl.internal.ssl.Provider
ssl.pkgs=com.sun.net.ssl.internal.www.protocol
#The location of the truststore (trusted certificates) and keystore ( if other than the default.
#you can uncomment this and change the path to the correct location.
javax.net.ssl.trustStore=/home/flyerhzm/software/jakarta-jmeter-2.2/tclient.keystore
javax.net.ssl.keyStore=/home/flyerhzm/software/jakarta-jmeter-2.2/kclient.keystore
#The password to your keystore
javax.net.ssl.keyStorePassword=changeit
标题搜索
日历
|
|||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
1 | 2 | 3 | 4 | ||||||
5 | 6 | 7 | 8 | 9 | 10 | 11 | |||
12 | 13 | 14 | 15 | 16 | 17 | 18 | |||
19 | 20 | 21 | 22 | 23 | 24 | 25 | |||
26 | 27 | 28 | 29 | 30 | 31 |
我的存档
数据统计
- 访问量: 718586
- 日志数: 415
- 图片数: 1
- 文件数: 3
- 建立时间: 2008-12-07
- 更新时间: 2015-07-14