]> Sergey Matveev's repositories - sgmon.git/commitdiff
tlsc has modern TLS implementation
authorSergey Matveev <stargrave@stargrave.org>
Wed, 30 Nov 2022 14:17:19 +0000 (17:17 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 30 Nov 2022 19:13:55 +0000 (22:13 +0300)
helper/https-cert [deleted file]
helper/tls-cert [new file with mode: 0755]

diff --git a/helper/https-cert b/helper/https-cert
deleted file mode 100755 (executable)
index 573b617..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh -e
-
-bad=0
-curl --range 0-100 --max-time 60 --verbose "$1" >/dev/null 2>state/curl-out || bad=1
-grep -q "subject:.*CN=$2" state/curl-out || bad=1
-if [ "$bad" -eq 1 ] ; then
-    cat state/curl-out
-    exit 1
-fi
diff --git a/helper/tls-cert b/helper/tls-cert
new file mode 100755 (executable)
index 0000000..3215386
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+tcpclient -DHR $1 ${2:-443} tlsc -name $1 -show :