mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
parent
73ffff658c
commit
8a48996008
16
rc/bashrc
16
rc/bashrc
@ -865,13 +865,15 @@ github-add-pulls() {
|
|||||||
|
|
||||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||||
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
||||||
serversslcertfp() {
|
serversslcertfp () {
|
||||||
SSSLCFFN="/tmp/$(date -Is).pem"
|
SSSLCFFN=$(openssl s_client -showcerts -connect $1 < /dev/null)
|
||||||
openssl s_client -showcerts -connect $1 < /dev/null|tee $SSSLCFFN
|
# To see all validity information
|
||||||
cat $SSSLCFFN|openssl x509 -md5 -fingerprint -noout
|
echo $SSSLCFFN
|
||||||
cat $SSSLCFFN|openssl x509 -sha1 -fingerprint -noout
|
# For getting the fingerprints
|
||||||
cat $SSSLCFFN|openssl x509 -sha256 -fingerprint -noout
|
echo $SSSLCFFN | openssl x509 -md5 -fingerprint -noout
|
||||||
rm $SSSLCFFN
|
echo $SSSLCFFN | openssl x509 -sha1 -fingerprint -noout
|
||||||
|
echo $SSSLCFFN | openssl x509 -sha256 -fingerprint -noout
|
||||||
|
unset SSSLCFFN
|
||||||
}
|
}
|
||||||
|
|
||||||
# The same for local certificate file
|
# The same for local certificate file
|
||||||
|
16
rc/zshrc
16
rc/zshrc
@ -843,13 +843,15 @@ github-add-pulls() {
|
|||||||
|
|
||||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||||
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
||||||
serversslcertfp() {
|
serversslcertfp () {
|
||||||
SSSLCFFN="/tmp/$(date -Is).pem"
|
SSSLCFFN=$(openssl s_client -showcerts -connect $1 < /dev/null)
|
||||||
openssl s_client -showcerts -connect $1 < /dev/null|tee $SSSLCFFN
|
# To see all validity information
|
||||||
cat $SSSLCFFN|openssl x509 -md5 -fingerprint -noout
|
echo $SSSLCFFN
|
||||||
cat $SSSLCFFN|openssl x509 -sha1 -fingerprint -noout
|
# For getting the fingerprints
|
||||||
cat $SSSLCFFN|openssl x509 -sha256 -fingerprint -noout
|
echo $SSSLCFFN | openssl x509 -md5 -fingerprint -noout
|
||||||
rm $SSSLCFFN
|
echo $SSSLCFFN | openssl x509 -sha1 -fingerprint -noout
|
||||||
|
echo $SSSLCFFN | openssl x509 -sha256 -fingerprint -noout
|
||||||
|
unset SSSLCFFN
|
||||||
}
|
}
|
||||||
|
|
||||||
# The same for local certificate file
|
# The same for local certificate file
|
||||||
|
Loading…
Reference in New Issue
Block a user