summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-01-27 02:20:05 +0100
committerache <ache@ache.one>2023-01-27 02:20:05 +0100
commit529e8fb407d89f2514a4a9879f408795838f98bc (patch)
treed9e7cc64260b3b6a633d64fd5207049a55f1bc9e /functions
parentPretty ping (diff)
Usefull check SSL date
Diffstat (limited to 'functions')
-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..64c5957
--- /dev/null
+++ b/functions/sslcheckdate.fish
@@ -0,0 +1,5 @@
+function sslcheckdate -d "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