bashrc & zshrc: add serversslcertfp function

Closes #51
This commit is contained in:
Mikaela Suomalainen 2014-12-19 08:53:59 +02:00
parent d5037e0eca
commit 113b794be8
2 changed files with 12 additions and 0 deletions

6
bashrc
View File

@ -840,6 +840,12 @@ github-add-pulls() {
git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*'
}
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
}
# .custom
if [ -f ~/.custom ]; then
source ~/.custom

6
zshrc
View File

@ -818,6 +818,12 @@ github-add-pulls() {
git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*'
}
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
}
# Source files for miscannellious modifications.
# .custom