OpenSSL: Difference between revisions
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
openssl pkcs12 -info -nokeys -passin \ | openssl pkcs12 -info -nokeys -passin \ | ||
pass:password -in chorke.p12 | pass:password -in chorke.p12 | ||
</syntaxhighlight> | |||
=== Debug === | |||
<syntaxhighlight lang="bash"> | |||
# check an MD5 hash of the public key | |||
openssl x509 -noout -modulus -in chorke.crt | openssl md5 | |||
openssl rsa -noout -modulus -in chorke.key | openssl md5 | |||
openssl req -noout -modulus -in chorke.csr | openssl md5 | |||
# check an ssl connection. all the certificates (including Intermediates) | |||
openssl s_client -connect api.chorke.org:5443/soap/services | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 05:34, 27 February 2018
Manipulation
Generate
# 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/Verify
# 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
openssl pkcs12 -info -nokeys -passin \
pass:password -in chorke.p12
Debug
# check an MD5 hash of the public key
openssl x509 -noout -modulus -in chorke.crt | openssl md5
openssl rsa -noout -modulus -in chorke.key | openssl md5
openssl req -noout -modulus -in chorke.csr | openssl md5
# check an ssl connection. all the certificates (including Intermediates)
openssl s_client -connect api.chorke.org:5443/soap/services