openssl s_client -connect www.google.com:443 < /dev/null
openssl s_client -quiet -connect www.google.com:443 << ENDL
GET
ENDL
heartbleed:
openssl s_client -connect www.google.com:443 -tlsextdebug 2>&1 < /dev/null | grep -i "server extension"
openssl x509 -text
wget http://www.thawte.com/repository/Thawte_SGC_CA.crt
openssl x509 -inform DER -in Thawte_SGC_CA.crt -text -noout
openssl x509 -inform DER -in Thawte_SGC_CA.crt -noout -purpose
openssl s_client -showcerts -connect xxx:443
openssl x509 -noout -fingerprint -in cert
openssl x509
Self Signed Cert
openssl req \
-x509 \
-nodes \
-newkey rsa:4096 -keyout root.key \
-days 3650 \
-set_serial 20111202001 \
-subj "/C=CN/ST=China/L=Guangzhou/OU=ByeBye/CN=test.org" \
-out root.pem
openssl genrsa -out mykey.pri 4096
openssl rsa -in mykey.pri -out mykey.pub -ouform PEM -pubout
Gen SHA1 Signature
openssl dgst -sha1 -sign mykey.pem -out xxx.sha1 xxx
openssl dgst -sha1 -verify pubkey.pem -signature xxx.sha1 xxx
Encrypt
openssl enc -camellia-256-cbc -d -in odds.camellia-256-cbc