From d9b718be129b4c37f2df2151d73bc78e542e66b1 Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Fri, 11 Jul 2014 17:29:57 +0200 Subject: [PATCH] clean up the extracted certificate the certificate extracted in the above way will contain some junk from openssl s_client output we don't want like verification status we can remove it ro reduce disk usage for saved certificates --- cipherscan | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cipherscan b/cipherscan index ae2ca2b..1a2236b 100755 --- a/cipherscan +++ b/cipherscan @@ -188,6 +188,8 @@ test_cipher_on_target() { /-----END CERTIFICATE-----/ {split_after=1} {if (n == i) print } ' <<<"$tmp") + # clean up the cert from junk before BEGIN CERTIFICATE + cert=$(${OPENSSLBIN} x509 <<<"$cert" 2>/dev/null) # compute sha256 fingerprint of the certificate local sha256sum=$(${OPENSSLBIN} x509 -outform DER <<<"$cert" 2>/dev/null |\