Advertisement
opexxx

sslgrabthenimport

Aug 18th, 2014
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. # Store the cert issued by a web server
  2. openssl s_client -showcerts -connect www.google.com:443 > www.google.com.pem
  3.  
  4. # Convert it from PEM format to DER format
  5. openssl x509 -in www.google.com.pem -inform PEM -out www.google.com.der -outform DER
  6.  
  7. # Import it into your keystore
  8. sudo /usr/java6/bin/keytool -import -alias www.google.com -file www.google.com.der -keystore /usr/java6/jre/lib/security/cacerts
  9.  
  10. # The keystore password is by default "changeit"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement