Difference between revisions of "Openssl"
From Wiki2
Line 26: | Line 26: | ||
===== from https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html# ===== | ===== from https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html# ===== | ||
openssl genrsa -out fd.key 512 | openssl genrsa -out fd.key 512 //create private key (no pass) | ||
openssl rsa -in fd.key -pubout -out fd-public.key //to separate out the public key | openssl rsa -in fd.key -pubout -out fd-public.key //to separate out the public key | ||
openssl req -new -key fd.key -out fd.csr //create csr from key | openssl req -new -key fd.key -out fd.csr //create csr from key | ||
openssl req -text -in fd.csr -noout //show your csr | openssl req -text -in fd.csr -noout //show your csr | ||
openssl x509 -req -days 365 -in fd.csr -signkey fd.key -out fd.crt // create a cert w/o questions | openssl x509 -req -days 365 -in fd.csr -signkey fd.key -out fd.crt // create a cert w/o questions | ||
openssl x509 -text -in fd.crt -noout //view the cert |
Revision as of 22:54, 19 January 2017
openssl
in cd ../vhosts/somecerts/smallcerts/
Generate a Private Key and a CSR
openssl req -newkey rsa:512 -nodes -keyout domain.key -out domain.csr
Generate a Self-Signed Certificate from an Existing Private Key
openssl req -key domain.key -new -x509 -days 365 -out domain.crt
View CSR Entries
openssl req -text -noout -verify -in domain.csr
View Certificate Entries
openssl x509 -text -noout -in domain.crt
Verify a Certificate was Signed by a CA
openssl verify -verbose -CAFile ca.crt domain.crt
from https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html#
openssl genrsa -out fd.key 512 //create private key (no pass) openssl rsa -in fd.key -pubout -out fd-public.key //to separate out the public key openssl req -new -key fd.key -out fd.csr //create csr from key openssl req -text -in fd.csr -noout //show your csr openssl x509 -req -days 365 -in fd.csr -signkey fd.key -out fd.crt // create a cert w/o questions openssl x509 -text -in fd.crt -noout //view the cert