How to resolve : java.io.IOException: jsse.alias_no_key_entry

后端 未结 4 1809
小蘑菇
小蘑菇 2020-12-11 19:13

I have a Debian virtual machine with Tomcat installed. I would like to install an SSL certificate so that my website is in Https.

I received the following certificat

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 19:45

    you need to import private key to keystore.

    Step1: You need to download openSSL and then move to C:\OpenSSL-win64\bin Next, type this command:

    openssl pkcs12 -export -in C:\Keystore\certificate.crt -inkey C:\Keystore\name_key.key -out C:\Keystore\server.p12 -name [name_alias] -CAfile C:\Keystore\rootCA.crt -caname root

    Note: if you use alias "tomcat" in server.xml

    keyAlias="tomcat"

    keystoreFile="C:\Keystore\server.jks"

    keystorePass="your pass"

    then [name_alias] = tomcat

    Step 2: use cmd and move to C:\program files\java\jdk..\ bin and type this command to convert p12 file to jks file:

    keytool -importkeystore -deststorepass mypass -destkeystore C:\Keystore\server.jks -srckeystore C:\Keystore\server.p12 -srcstoretype PKCS12

    Resart your tomcat server

提交回复
热议问题