From 844c879f2d923e2b475ed219f807eff596933cc4 Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 19 Apr 2023 13:25:39 +0200 Subject: [PATCH] add: split-ssl-certs --- bash/split-ssl-certs.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bash/split-ssl-certs.sh diff --git a/bash/split-ssl-certs.sh b/bash/split-ssl-certs.sh new file mode 100755 index 0000000..df40c99 --- /dev/null +++ b/bash/split-ssl-certs.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# split cert-chain received from server in seperate certificates +openssl s_client -showcerts -servername someserverssniname.intra.dlr.de -connect someserver.intra.dlr.de:443 < /dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p' | csplit -f cert - '/-----BEGIN CERTIFICATE-----/' '{*}' +