File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10121,9 +10121,9 @@ certificate_info() {
1012110121 expok="OK"
1012210122 fi
1012310123 out " ($enddate). "
10124- # Match on Subject/Issuer plus next 4 lines, there should be the CN
10125- cn="$(awk '/Subject:/{stop=NR+4 }; NR<=stop' <<< "${intermediate_certs_txt[i]}" | awk -F= '/CN/ { print $NF }')"
10126- issuer_CN="$(awk '/Issuer:/{stop=NR+4 }; 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 }')"
1012710127 # to catch errors like #2789 during unit test:
1012810128 [[ -z "$cn" ]] && cn="FIXME: cn error"
1012910129 [[ -z "$issuer_CN" ]] && issuer_CN="FIXME: issuer_CN error"
You can’t perform that action at this time.
0 commit comments