Pages

Categories

Archives

[Google]

Sponsored Links

Openssl quickies

This isn’t meant to be anything other than some quick commands to use with openssl. I hope this helps someone else; I will add/update this with other commands as I need them or someone asks how.

#command to import cert into java keystore
keytool -import -v -trustcacerts -file nameofcert.cer -keystore <location of keystore>
keytool -import -v -trustcacerts -file nameofcert.cert

#openssl commands to view cert
openssl req -text -in nameofcert.cert
openssl req -verify -in nameofcert.cer
openssl x509 -text -in cert

<strong># who issued the cert?</strong>
openssl x509 -noout -in cert.pem -issuer

<strong># to whom was it issued?</strong>
openssl x509 -noout -in cert.pem -subject

<strong># for what dates is it valid?</strong>
openssl x509 -noout -in cert.pem -dates

<strong># the above, all at once</strong>
openssl x509 -noout -in cert.pem -issuer -subject -dates

<strong># what is its hash value?</strong>
openssl x509 -noout -in cert.pem -hash

<strong># what is its MD5 fingerprint?</strong>
openssl x509 -noout -in cert.pem -fingerprint

Comments are closed.