From 17f66c8ea79d6e46986af2a22e0bb8cc523157d2 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Thu, 24 Sep 2020 12:59:01 +0300 Subject: [PATCH] ++check-cert --- README.md | 4 ++++ scripts/check-cert | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100755 scripts/check-cert diff --git a/README.md b/README.md index 5c5e761..f817827 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ will create the symbolic link for each script in the \ directory. - [mem](scripts/mem) stores the shorts notes in the file. - [pomodoro](scripts/pomodoro) tracks the working time. +## Network + +- [check-cert](scripts/check-cert) retrieves information about web site's TLS certificate. + ## WWW - [bor](scripts/bor) displays the latest posts from [bash.im](https://bash.im) website. diff --git a/scripts/check-cert b/scripts/check-cert new file mode 100755 index 0000000..c316943 --- /dev/null +++ b/scripts/check-cert @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +DOMAIN=${1:?USAGE: check-cert [domain name]} + +echo | { openssl s_client -connect "${DOMAIN}:443" \ + | openssl x509 -noout -dates; +} 2>&1 | sed -E '/verify|DONE/d; s/^depth=[0-9]+[[:space:]]+//' +