OpenSSL: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Manipulation == <syntaxhighlight lang="bash"> # generate a new private key and certificate signing request openssl req -out chorke.csr -new -newkey rsa:2048 -nodes \ -keyou...") |
|||
Line 8: | Line 8: | ||
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \ | openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \ | ||
-keyout privateKey.key -out certificate.crt | -keyout privateKey.key -out certificate.crt | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
# check a certificate signing request(csr) | |||
openssl req -text -noout -verify -in chorke.csr | |||
# check a private key | |||
openssl rsa -check -in chorke.key | |||
# check a certificate | |||
openssl x509 -text -noout -in chorke.crt | |||
# check a pkcs#12 file (.pfx or .p12) | |||
openssl pkcs12 -info -in chorke.p12 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 05:10, 27 February 2018
Manipulation
# generate a new private key and certificate signing request
openssl req -out chorke.csr -new -newkey rsa:2048 -nodes \
-keyout chorke.key
#generate a self-signed certificate
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \
-keyout privateKey.key -out certificate.crt
# check a certificate signing request(csr)
openssl req -text -noout -verify -in chorke.csr
# check a private key
openssl rsa -check -in chorke.key
# check a certificate
openssl x509 -text -noout -in chorke.crt
# check a pkcs#12 file (.pfx or .p12)
openssl pkcs12 -info -in chorke.p12