File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ my $openssl_json="";
2626# @args="$prg $check2run $uri >/dev/null";
2727# system("@args") == 0
2828# or die ("FAILED: \"@args\" ");
29- my $socket_errors =' (e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found' ;
30- my $openssl_errors =' (e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found' ;
29+ my $socket_errors =' (e|E)rror|FIXME| \.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found' ;
30+ my $openssl_errors =' (e|E)rror|FIXME| (f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found' ;
3131my $json_errors =' (id".*:\s"scanProblem"|severity".*:\s"FATAL"|"Scan interrupted")' ;
3232
3333
Original file line number Diff line number Diff line change @@ -10121,9 +10121,12 @@ certificate_info() {
1012110121 expok="OK"
1012210122 fi
1012310123 out " ($enddate). "
10124- # Match on Subject/Issuer plus next 3 lines
10125- cn="$(awk '/Subject:/{stop=NR+3}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')"
10126- issuer_CN="$(awk '/Issuer:/{stop=NR+3}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')"
10124+ # Match Subject/Issuer on next 5 lines, where the CN is (4 lines is fine in most cases, 5 should suffice for all certs)
10125+ cn="$(awk '/Subject:/{stop=NR+5}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')"
10126+ issuer_CN="$(awk '/Issuer:/{stop=NR+5}; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')"
10127+ # to catch errors like #2789 during unit test:
10128+ [[ -z "$cn" ]] && cn="FIXME: cn error"
10129+ [[ -z "$issuer_CN" ]] && issuer_CN="FIXME: issuer_CN error"
1012710130 pr_italic "$(strip_leading_space "$cn")"; out " <-- "; prln_italic "$(strip_leading_space "$issuer_CN")"
1012810131 fileout "intermediate_cert_notAfter <#${i}>${json_postfix}" "$expok" "$enddate"
1012910132 fileout "intermediate_cert_expiration <#${i}>${json_postfix}" "$expok" "$cn_finding"
You can’t perform that action at this time.
0 commit comments