SSL 加密在Jrun上的配置

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

SSL 加密在Jrun上的配置

第一步:配置服务器证书

将由CA颁发的服务器证书放到Jrun服务对应目录下,并记下相应的目录路径,如服务app服务需SSL加密,那么就将服务器证书文件server_keystore放到某路径..jrun4/app/目录下,即:..jrun4/servers/app/server_keystore

第二步:修改Jrun XML配置文件jrun.xml

编辑器:UltraEdit32或XML编辑器(注:一定要支持UNICODE编码的编辑器)

修改步骤:

1、用编辑器打开服务下的jrun.xml,如当前打开:../jrun4/servers/app/SERVER_INF/jrun.xml

2、找到SSL配置节,原始为:

<!-- Uncomment this service to use SSL with the JRun Web Server

Note that you MUST create your own keystore before using this service

<service class="jrun.servlet.http.SSLService" name="SSLService">

<attribute name="port">9100</attribute>

<attribute name="keyStore">{jrun.rootdir}/lib/keystore</attribute>

<attribute name="keyStorePassword">changeit</attribute>

<attribute name="trustStore">{jrun.rootdir}/lib/trustStore</attribute>

<attribute name="socketFactoryName">jrun.servlet.http.JRunSSLServerSocketFactory</attribute>

</service>

-->

3、修改说明:

<service class="jrun.servlet.http.SSLService" name="SSLService">

<attribute name="port">9100</attribute><!—9100为相应的SSL端口号 -->

<attribute name="keyStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<!—/servers/app/server_keystore相应的存储服务器证书的文件路径-->

<attribute name="keyStorePassword">changeit</attribute>

<!—changeit相应的服务器证书口令-->

<attribute name="trustStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<!—/servers/app/server_keystore存储可信任证书的文件路径-->

<attribute name="socketFactoryName">jrun.servlet.http.JRunSSLServerSocketFactory

</attribute>

<!--clientAuth表示是否对客户身份进行验证,此段用户加上-->

<attribute name="clientAuth">false</attribute><!--false:服务端认证;true:客户端认证 -->

<attribute name="bindAddress">*</attribute>

<attribute name="interface">*</attribute>

</service>

4、去掉注释前后符号<!-- -->

5、修改结果如下

服务端认证时:

<!-- Uncomment this service to use SSL with the JRun Web Server

Note that you MUST create your own keystore before using this service -->

<service class="jrun.servlet.http.SSLService" name="SSLService">

<attribute name="port">9100</attribute>

<attribute name="keyStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<attribute name="keyStorePassword">12345678</attribute>

<attribute name="trustStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<attribute name="socketFactoryName">jrun.servlet.http.JRunSSLServerSocketFactory</attribute>

<attribute name="clientAuth">false</attribute>

<attribute name="bindAddress">*</attribute>

<attribute name="interface">*</attribute>

</service>

客户端认证时:

<!-- Uncomment this service to use SSL with the JRun Web Server

Note that you MUST create your own keystore before using this service -->

<service class="jrun.servlet.http.SSLService" name="SSLService">

<attribute name="port">9100</attribute>

<attribute name="keyStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<attribute name="keyStorePassword">12345678</attribute>

<attribute name="trustStore">{jrun.rootdir}/servers/app/server_keystore</attribute>

<attribute name="socketFactoryName">jrun.servlet.http.JRunSSLServerSocketFactory</attribute>

<attribute name="clientAuth">true</attribute>

<attribute name="bindAddress">*</attribute>

<attribute name="interface">*</attribute>

</service>

第三步:修改E2Q平台配置文件

打开E2Q业务基础管理平台Web包:e2q2.war,修改相应的E2Q业务基础管理平台的配置管理文件:e2qsys.properties,修改方法如下:

sys.sslType=server 说明:该项值有服务端认证:server 、客户端认证:client

sys.sslPort=SSL端口 说明:此为相应的SSL端口,由相应的Jrun服务下的Jrun.xml设置

sys.httpPort=JRUN服务端口 说明:此为Jrun服务端口,由配置Jrun服务时设置

修改完后重新打包;

第四步:安装客户端CA根证书

在客户端运行安装CA根证书文件如:ca-cert.crt安装相应的证书

第五步:重启相应Jrun服务

在Jrun端口中启动相应服务如:E2Qtest

运行结果:相应的http:// 改变为https://

术语解释:

服务端认证方式:

该种加密方式为通过服务端证书进行加密,登录时传送数据进行相应的加密传送数据。运行结果为出现登录界面。

客户端认证方式:

该种加密方式为通过服务端证书结合客户证书进行加密,登录时传送数据进行相应的加密传送数据。运行结果为不出现登录界面而出现相应的证号录入界面或插入证书盘后直接登录。

证书生成方式:

服务器证书和用户认证书由CA颁发。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航