From 9aeafa4c6e5373fd144972dd020907218e9eb3c7 Mon Sep 17 00:00:00 2001 From: Peter Kreuser Date: Wed, 17 Jun 2026 22:53:25 +0200 Subject: [PATCH] [Bug] FIXME: issuer_CN error with more than 5 lines in Issuer #3065 --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 3324fb4..6cd3688 100755 --- a/testssl.sh +++ b/testssl.sh @@ -10191,7 +10191,7 @@ certificate_info() { out " ($enddate). " # Match Subject/Issuer on next 5 lines, where the CN is (4 lines is fine in most cases, 5 should suffice for all certs) cn="$(awk '/Subject:/{stop=NR+5}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')" - issuer_CN="$(awk '/Issuer:/{stop=NR+5}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')" + issuer_CN="$(awk '/Issuer:/{stop=NR+7}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')" # to catch errors like #2789 during unit test: [[ -z "$cn" ]] && cn="FIXME: cn error" [[ -z "$issuer_CN" ]] && issuer_CN="FIXME: issuer_CN error"