From 113b794be87bf4c3211ee5e9565ae23c8c59654e Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Fri, 19 Dec 2014 08:53:59 +0200 Subject: [PATCH] bashrc & zshrc: add serversslcertfp function Closes #51 --- bashrc | 6 ++++++ zshrc | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/bashrc b/bashrc index 0803d93e..64a86c71 100644 --- a/bashrc +++ b/bashrc @@ -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 diff --git a/zshrc b/zshrc index 01b98033..c7c44a5c 100644 --- a/zshrc +++ b/zshrc @@ -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