Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create cert and store
- openssl genrsa -out server.key 2048
- openssl rsa -in server.key -out server.key
- openssl req -sha256 -new -key server.key -out server.csr -subj '/CN=localhost'
- openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out localhost.crt
- # convert to pkcs12, and then convert to Java keystore
- openssl pkcs12 -export -in localhost.crt -inkey server.key -out server.p12 -name localhost -CAfile ca.crt -caname root
- keytool -importkeystore -deststorepass changeit -destkeypass changeit -destkeystore keystore.jks -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass changeit -alias localhost
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement