频道栏目
首页 > 资讯 > 网络协议 > 正文

jdk1.8创建证书及tomcat8.5配置https的步骤教程

18-07-12        来源:[db:作者]  
收藏   我要投稿

1、创建证书

keytool -genkey -alias tomcat -keypass tomcat2018 -keyalg RSA -keystore tomcat.keystore  

输入密码tomcat2018

What is your first name and last name?

sso.tomcat.com

what is the name of your organizational unit?

com

What is the name of your organizational?

com

What is the name of your city or locality?

com

What is the name of your state or province?

com

What is the two-letter country code for this unit?

CN

之后确认yes

其他命令:

证书条目删除 

keytool -delete -alias tomcat -keystore tomcat.keystore -storepass tomcat2018

查看证书信息

keytool -list -v -keystore /opt/apache-tomcat-8.5.32/conf/cert/tomcat.keystore -storepass tomcat2018

2、导出证书

keytool -export -file tomcat.crt -alias tomcat -keypass tomcat2018 -keystore tomcat.keystore 

3、为客户端JVM导入证书  tomcat2018

keytool -import -file /usr/java/jdk1.8.0_172-amd64/bin/tomcat.crt -keypass tomcat2018 -alias tomcat -keystore "mycerts" 

4、应用证书到web容器-Tomcat               

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"

               maxThreads="150" scheme="https" secure="true"

               clientAuth="false" sslProtocol="TLS" keystoreFile="/opt/apache-tomcat-8.5.32/conf/cert/tomcat.keystore" keystorePass="tomcat2018" />           

5、启动tomcat,访问https://192.168.0.129:8443/出现  https://sso.tomcat.com:8443

curl --insecure https://192.168.0.129:8443/

相关TAG标签
上一篇:Android开发中关于静态代码检测工具 CheckStyle Lint FindBugs Pmd 的对比讲解
下一篇:Mysql中的关键字和保留字学习讲解及Mysql命名建议
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站