0

I need to make my website SSL configured. I have the following files with me: file.csr and file.jks

and I need the following files to SSL enable my website: file.crt and file.key and keystore

I have searched through the internet but found no help regarding. Can anyone tell me how I can get these files using the files I already have?

I have tried multiple options for conversion but nothing worked.

<Connector port="8442" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/conf/keys/server/keystore" keystorePass="CHANGEME"/> 
2
  • Have you considered searching through the Tomcat documentation? instead of the entire Internet? It's all in there. Commented May 9, 2019 at 8:08
  • i have got the answer. Commented May 9, 2019 at 9:00

1 Answer 1

5

Following are the commands I performed to get the desire result

Convert mobiliser.jks file to keystore.p12:

keytool -importkeystore -srckeystore mobiliser.jks -destkeystore keystore.p12 -deststoretype PKCS12 

Convert keystorep.12 file to keystore:

keytool -importkeystore -srckeystore keystore.p12 -srcstoretype pkcs12 -destkeystore keystore -deststoretype JKS 

Create key:

C:\openssl-0.9.8k_X64\bin\openssl pkcs12 -in keystore.p12 -nocerts -nodes -out mobiliser.key 

Create certificate:

C:\openssl-0.9.8k_X64\bin\openssl pkcs12 -in keystore.p12 -nokeys -out mobiliser.crt 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.