首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

施用HTTPS协议

2012-07-01 
使用HTTPS协议1) 生成证书keytool -genkey -alias ying -keyalg RSA -validity 36502A) Tomcat7.x%CATALIN

使用HTTPS协议
1) 生成证书

keytool -genkey -alias ying -keyalg RSA -validity 3650


2A) Tomcat7.x
%CATALINA_HOME%/conf/server.xml
<Connector port="8443"protocol="HTTP/1.1"SSLEnabled="true"maxThreads="150" scheme="https" secure="true"clientAuth="false"sslProtocol="TLS"keystorePass="yingzhor@163.com" />


2B) Jetty嵌入式容器 (maven plugin)
<plugin><groupId>org.mortbay.jetty</groupId><artifactId>maven-jetty-plugin</artifactId><version>6.1.26</version><configuration><scanIntervalSeconds>20</scanIntervalSeconds><stopKey>foo</stopKey><stopPort>9999</stopPort><connectors><connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"><port>8080</port><maxIdleTime>60000</maxIdleTime></connector><connector implementation="org.mortbay.jetty.security.SslSocketConnector"><port>8443</port><maxIdleTime>60000</maxIdleTime><keystore>C:/Documents and Settings/zhuoying/.keystore</keystore><password>yingzhor@163.com</password><keyPassword>yingzhor@163.com</keyPassword></connector></connectors></configuration><executions><execution><id>start-jetty</id><phase>pre-integration-test</phase><goals><goal>run</goal></goals><configuration><scanIntervalSeconds>0</scanIntervalSeconds><daemon>true</daemon></configuration></execution><execution><id>stop-jetty</id><phase>post-integration-test</phase><goals><goal>stop</goal></goals></execution></executions><dependencies><dependency><groupId>org.mortbay.jetty</groupId><artifactId>jetty-sslengine</artifactId><version>6.1.26</version></dependency></dependencies></plugin>

热点排行