Guest User

Untitled

a guest
Jul 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. # Open a command terminal in the bin folded of your java installation (e.g: C:\Program File(x86)\Java\jreXXXX\bin)
  2. # In the commands below :
  3. # - selfsigned is the name of the certificate
  4. # - storPass is the password of the keystore and truststore
  5. # - keyPass is the password of the certificate
  6. # You can change those values for yours
  7.  
  8. #Generate the keystore.jks
  9. keytool -genkeypair -alias selfsigned -keyalg RSA -keysize 2048 -validity 365 -keypass keyPass -storepass storPass -keystore keystore.jks
  10. #Enter your informations when prompt
  11. #Be aware those information will be visible in your browser
  12.  
  13. #Export the selfsigned.cer from the keystore.jks
  14. keytool -exportcert -alias selfsigned -file root.cer -keystore keystore.jks -storepass storPass
  15.  
  16. #Generate the truststore.jks
  17. keytool -importcert -alias selfsigned -file root.cer -keystore truststore.jks -storepass storPass
  18.  
  19. #The jks files are available in the folder
Add Comment
Please, Sign In to add comment