zoukankan      html  css  js  c++  java
  • JDK自带keytool工具配置HTTPS加密协议

    1.使用JDK自带的keytool工具生成一个证书(keystore文件),其中包含了密钥。
    a.在命令行输入以下命令:keytool -genkey -alias tbb -keyalg RSA -keystore d: bb.keystore(可自选地址)
    b.根据系统提示输入“keystore”密码和其他信息,注意:您的名字与姓氏是什么?此项要输入本机IP地址
    c.输入私钥密码,确认私钥密码
    系统将在当前目录下生成一个“keystore”文件
    2.创建自签名的证书
    a.使用使用JDK自带的命令keytool创建自签名证书:keytool -selfcert -alias tbb -keystore d: bb.keystore(可自选地址)
    b.创建成功后,将证书导出:keytool -export -alias tbb -keystore d: bb.keystore -storepass 123456 -rfc -file d: bb.cer(可自选地址)
    c.将证书导入到“受信任的根证书颁发机构”,开始->运行->certmgr.msc
    3.修改配置文件server.xml,如下:
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS" keystorePass="your passwd" keystoreFile="your keystore"/>
    4.重启tomcat

  • 相关阅读:
    单选文本及多行文本溢出问题
    div和textarea内容转换(****)
    URL OR PC/PHONE OR Strlen
    DocumentFragment(创建文档碎片节点)
    ETag
    重绘和回流
    自定义指令
    Angular JS 自定义服务
    jquery ajax 实例
    js 斐波那契序列
  • 原文地址:https://www.cnblogs.com/fxcoding/p/14692316.html
Copyright © 2011-2022 走看看