summaryrefslogtreecommitdiff
path: root/functions/sslcheckdate.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/sslcheckdate.fish')
-rw-r--r--functions/sslcheckdate.fish5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions/sslcheckdate.fish b/functions/sslcheckdate.fish
new file mode 100644
index 0000000..3bd6228
--- /dev/null
+++ b/functions/sslcheckdate.fish
@@ -0,0 +1,5 @@
+function sslcheckdate --description "Check the validity date of a distant SSL server"
+ # PEM format
+ echo "Validity dates of certificat of $argv[1] on port 443 (PEM format)"
+ echo "Q" | openssl s_client -servername $argv[1] -connect $argv[1]:443 2>/dev/null | openssl x509 -noout -dates
+end