keytool -genkeypair -keyalg RSA -keysize 2048 -dname "CN=SERVER_NAME" -validity 365 -alias client -keystore client.jks -storepass changeit -keypass changeit keytool -export -rfc -file client.crt -alias client -keystore client.jks -storepass changeit keytool -import -file server.crt -alias server -keystore client.jks -storepass changeit -noprompt