OpenSSL
- Get web (https) server’s banner:
openssl s_client -connect:IPAddress:443
after connection is established type in “HEAD / HTTP/1.0” and press enter
- Generating unix-style MD5 hash:
openssl passwd -1 -salt QIGCa pippo
produces: $1$QIGCa$/ruJs8AvmrknzKTzM2TYE.
- Converting a DER-encoded Certificate to PEM format:
openssl x509 -in InputCertFile.crt -inform DER -out NewCertFile.pem -outform PEM
- Converting a PKCS12-encoded (or .pfx) Certificate to PEM format:
openssl pkcs12 -in InputCertFile.p12 -out NewCertFile.pem -nodes -cacerts
Java keytool
- Download the CA certificate from the proxy and convert it to PEM format:
/usr/java/default/bin/keytool -import -trustcacerts -file -alias CA_ALIAS -keystore /usr/java/default/lib/security/cacerts -storepass changeit
More:
- The Most Common Java Keytool Keystore Commands – http://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html
- keytool – Key and Certificate Management Tool – http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/keytool.html