serviceMix https搭建
来源:互联网 发布:elasticsearch golang 编辑:程序博客网 时间:2024/04/28 16:43
1、ca的准备
1、建立某个ca根目录,用来进行ca证书的管理(例如:/opt/CA)。
2、在ca根目录下建立如下文件夹: newcerts、private,其中newcerts用于存放新生成的证书(openssl 自动管理),private用于存放自己的ca根证书的私钥。
3、将openssl目录中的openssl.cnf文件复制到该目录下,并将[ CA_default ]下的dir修改为第1步中的ca根目录/opt/CA,还要修改 [policy-match] ,将DName的匹配策略都改成optional。
4、在ca根目录下建立文件:空白文件index.txt、带有内容为01的文件serial
5、制作CA根证书(dname="CN=ca, OU=aa, O=bb, L=GZ, ST=Canton, C=CN")
openssl req -new -x509 -days 18900 -sha1 -newkey rsa:1024 -keyout /opt/CA/private/ca.key -out /opt/CA/ca.crt
2、自签名证书的生成
keytool -genkey -validity 13650 -keyalg RSA -keysize 1024 -keystore ./jetty.jks -alias jetty -dname "CN=ca, OU=aa, O=bb, L=GZ, ST=Canton, C=CN"
2、导出签名请求证书
keytool -certreq -sigalg MD5withRSA -file ./jettyReq.csr -keystore ./jetty.jks -alias jetty
3、生成自签名证书
openssl ca -in ./jettyReq.csr -out ./signedjetty.crt -notext -cert /opt/CA/ca.crt -keyfile /opt/CA/private/ca.key -config /opt/CA/openssl.cnf
4、将CA根证书的公钥导入服务端证书
keytool -import -v -trustcacerts -alias root -file /opt/CA/ca.crt -keystore ./jetty.jks
5、将自签名证书导入服务端证书
keytool -import -v -file ./signedjetty.crt -keystore ./jetty.jks
3、serverMix配置
1、在serviceMIX 安装目录下找到etc/org.ops4j.pax.web.cfg.empty.stub 文件
2、把该文件下的以下信息注解删除,并修改相应的信息
org.osgi.service.http.secure.enabled=true
org.ops4j.pax.web.ssl.keystore=E:/ca/jetty.jks
org.ops4j.pax.web.ssl.password=123456
org.ops4j.pax.web.ssl.keypassword=123456
org.osgi.service.http.port.secure=8443
3、把这文件重命名为
org.ops4j.pax.web.cfg
4、jetty.xml 加以下代码:
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Set name="Port">8443</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">2</Set>
<Set name="AcceptQueueSize">100</Set>
<Set name="Keystore">E:\ca\jetty.jks</Set>
<Set name="Password">123456</Set>
<Set name="KeyPassword">123456</Set>
<Set name="truststore">E:\ca\jetty.jks</Set>
<Set name="trustPassword">123456</Set>
</New>
</Arg>
</Call>
5、重启
- serviceMix https搭建
- serviceMix https
- ServiceMix
- 搭建https
- Nginx搭建HTTPS服务器
- nginx搭建https服务器
- Nginx https 搭建
- HTTPS环境搭建
- Nginx 搭建 HTTPS 服务器
- HTTPS站点搭建教程
- nginx搭建https服务器
- tomcat搭建https
- nginx搭建https服务器
- Nginx搭建HTTPS服务器
- tomcat 搭建https服务
- HTTPS环境搭建
- android 搭建https Server
- 搭建https服务器
- HTTP HTTPs
- NAT理解
- POJ Apple Tree (树状数组 + dfs序)
- Hibernate检索方式之Native SQL
- Customizing the default Error Page on Laravel 5.1
- serviceMix https搭建
- paramiko scp
- 手机浏览器判断手机系统
- 关于cocos2d-x移植到WP8之上的中文乱码问题
- 从语句 char* p="test" 说起
- isis的一个实验
- AJAX 嵌套,实现甘特图显示
- 常见HTTP状态码
- 游戏中的优化指的是什么?