Matteo Mattei

Hello, my name is Matteo Mattei and this is my personal website. I am computer engineer with a long experience in Linux system administration and web software development.

linkedin rss twitter google+ github facebook

List of some useful openssl commands

This is a list of some useful openssl commands I used. Just a brief description of what you need to to and the actual command, no more!

openssl verify -CAfile ca.pem certificate.pem
openssl x509 -noout -modulus -in certificate.pem | openssl md5
openssl rsa -noout -modulus -in key.pem | openssl md5
openssl x509 -in certificate.pem -noout -text
openssl req -text -noout -verify -in csr.pem
openssl rsa -in key.pem -check
openssl pkcs12 -info -in key.p12
openssl req -new -x509 -days 365 -keyout ca-key.pem -out ca-cert.pem
openssl genrsa -out privkey.pem 4096
openssl req -new -sha256 -key privkey.pem -out csr.pem
openssl x509 -req -days 365 -in csr.pem -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out certificate.pem
openssl pkcs7 -inform der -in certificate.p7c -print_certs -out certificate.pem
openssl pkcs12 -in file.pfx -nocerts -out privkey.pem
openssl pkcs12 -in file.pfx -clcerts -nokeys -out cert.pem

// remove password from the private key
openssl rsa -in privkey.pem -out key.pem
comments powered by Disqus