mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
bashrc & zshrc: clone & break serversslcertfp
serversslcertfp now has comments and there are separate functions for md5, sha1 and sha256.
This commit is contained in:
parent
4cf47c1c6a
commit
ae47a222e6
19
bashrc
19
bashrc
@ -841,12 +841,31 @@ github-add-pulls() {
|
||||
git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*'
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
# Note that this should not be pointed to round-robin and is pointed
|
||||
# preferably to direct IP address.
|
||||
# Note that OpenSSL doesn't support IPv6 at time of writing (2014-12-21).
|
||||
serversslcertfp() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -md5 -noout -in /dev/stdin
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha1 -noout -in /dev/stdin
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpmd5() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -md5 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpsha1() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha1 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpsha256() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# .custom
|
||||
if [ -f ~/.custom ]; then
|
||||
source ~/.custom
|
||||
|
19
zshrc
19
zshrc
@ -819,12 +819,31 @@ github-add-pulls() {
|
||||
git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*'
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
# Note that this should not be pointed to round-robin and is pointed
|
||||
# preferably to direct IP address.
|
||||
# Note that OpenSSL doesn't support IPv6 at time of writing (2014-12-21).
|
||||
serversslcertfp() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -md5 -noout -in /dev/stdin
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha1 -noout -in /dev/stdin
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpmd5() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -md5 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpsha1() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha1 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||
serversslcertfpsha256() {
|
||||
openssl s_client -connect $1 < /dev/null 2>/dev/null|openssl x509 -fingerprint -sha256 -noout -in /dev/stdin
|
||||
}
|
||||
|
||||
# Source files for miscannellious modifications.
|
||||
|
||||
# .custom
|
||||
|
Loading…
Reference in New Issue
Block a user