• Tomcat SSL生成秘钥


    set SERVER_DN="CN=10.129.205.248, OU=cybersoft.com, O=cybersoft, L=CN, S=CN, C=CN" 
    set CLIENT_DN="CN=cybersoft.com.tw, OU=cybersoft.com, O=cybersoft, L=CN, S=CN, C=CN"
    set PASS_SET="client"
    set SPASS_SET="server"
    set CER_ROOT_PATH="E:caskey"
    :: 路径不存在则创建路径
    if not exist %CER_ROOT_PATH% md %CER_ROOT_PATH%
    ::制作 keystore
    
    keytool -genkey -alias cyber_server -keyalg RSA -keystore %CER_ROOT_PATH%/keystore -dname %SERVER_DN% -storepass %SPASS_SET% -keypass %SPASS_SET% -validity 36500
    
    keytool -genkey -alias cyber_client -keyalg RSA -storetype PKCS12 -keystore %CER_ROOT_PATH%/client.key.p12 -dname %SERVER_DN% -keypass %PASS_SET% -storepass %PASS_SET% -validity 36500
    
    keytool -export -alias cyber_server -keystore %CER_ROOT_PATH%/keystore -storepass %SPASS_SET% -rfc -file %CER_ROOT_PATH%/server.cer
    
    keytool -export -alias cyber_client -storetype PKCS12 -keystore %CER_ROOT_PATH%/client.key.p12 -storepass %PASS_SET% -rfc -file %CER_ROOT_PATH%/client.cer
    
    keytool -import -file %CER_ROOT_PATH%/server.cer -storepass %PASS_SET% -keystore %CER_ROOT_PATH%/truststore.jks -noprompt
    
    keytool -import -file %CER_ROOT_PATH%/client.cer -storepass %SPASS_SET% -keystore %CER_ROOT_PATH%/client.truststore -noprompt
    
    pause
  • 相关阅读:
    Intellij IDEA 常用快捷键
    @Transient注解----Hiberbate
    tomcat:域名指向项目名
    java实现全排列
    Bean不同配置方式的比较
    Spring MVC:在jsp中引入css
    Spring中Bean的作用域
    第9章 初识HAL固件库
    第8章 自己写库—构建库函数雏形
    第7章 使用寄存器点亮LED灯
  • 原文地址:https://www.cnblogs.com/liuys635/p/14314850.html
Copyright © 2020-2023  润新知