
Nginx 및 Apache에서 사용되는 도메인에 대한 기존 SSL 파일이 있습니다.
keystore
기존 GoDaddy .key 및 .crt 파일에서 Tomcat을 만드는 방법
나는 아래에서 시도했다
keytool -import -alias tomcat -keystore k.key -file k.crt
아래 오류가 발생했습니다.
keytool error: java.io.IOException: Invalid keystore format
아래에서 처음부터 SSL을 생성하는 방법을 얻었지만 이를 되돌려야 합니다. https://in.godaddy.com/help/tomcat-generate-csrs-and-install-certificates-5239
아래 편집은 Tomcat SSL 구성입니다.
<Connector port="${tomcat.ssl.port}"
maxHttpHeaderSize="8192"
maxPostSize="4194304"
maxThreads="150"
protocol="org.apache.coyote.http11.Http11Protocol"
executor="hybrisExecutor"
enableLookups="false"
acceptCount="${tomcat.acceptcount}"
connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="UTF-8"
SSLEnabled="true"
scheme="https"
secure="true"
clientAuth="false"
sslProtocol = "TLS"
keystoreFile="/data/ssl/cert/keystore.jks"
keystorePass="123456"
keystoreType="JKS"
keyPass="123456"
/>
답변1
두 단계가 있습니다. 먼저 pkcs12로 내보냅니다.
openssl pkcs12 -export -in mycert.crt -inkey myprivate.key -certfile mycert.crt -name "mytomcat" -out mykeystore.p12
다음으로 keytool 명령을 사용하여 jks 파일을 만듭니다.
keytool -importkeystore -srckeystore mykeystore.p12 -srcstoretype pkcs12 -destkeystore keystore.jks -deststoretype JKS