-
Notifications
You must be signed in to change notification settings - Fork 1
Creating a keystore.jks for SSL (https)
BytePhil edited this page Jan 15, 2022
·
1 revision
- Safe your Certificate ("-----BEGIN CERTIFICATE-----") to "cert.pem" and your private key ("-----BEGIN PRIVATE KEY-----") to "private-key.key"
- Paste this command into your ssh terminal (at the folder where you created the files)
openssl pkcs12 -export -out server.p12 -inkey private-key.key -in cert.pem - Then this command. Replace with your password
keytool -genkey -alias httpstls -keyalg RSA -keysize 2048 \ -dname "CN=unwichtig.com, OU=IT, O=Company, L=Toronto, ST=Ontario, C=CA" \ -keypass YOURKEYSTOREPWPLEASECHANGE \ -keystore keystore.jks \ -storepass YOURKEYSTOREPWPLEASECHANGE(DON'T CHANGE THE CN, OU, O etc.!) - Paste this command with replaced password
keytool -delete -alias httpstls -keystore keystore.jks -storepass YOURKEYSTOREPWPLEASECHANGE - Then this. Replace "changeit" with your password
keytool -importkeystore \ -deststorepass changeit \ -destkeypass changeit \ -destkeystore keystore.jks \ -srckeystore server.p12 \ -srcstoretype PKCS12 \ -srcstorepass changeit \ -srcalias 1 \ -destalias 1 - Go to your server.cfg and change the "ssl.keystorePath=" to your path. Also set "ssl.keystorePassword=" to your password and activate SSL "ssl.activated=false"