Fix check for self-signed certificate

The check for whether a certificate is self-signed was using the undefined variable $CN rather than $cn.
This commit is contained in:
David Cooper 2016-07-22 12:06:52 -04:00 committed by GitHub
parent ddead05825
commit ae38670067
1 changed files with 1 additions and 1 deletions

View File

@ -4151,7 +4151,7 @@ certificate_info() {
issuer_C="$(awk -F'=' '/ C=/ { print $2 }' <<< "$issuer")"
issuer_DC="$(awk -F'=' '/DC=/ { print $2 }' <<< "$issuer")"
if [[ "$issuer_O" == "issuer=" ]] || [[ "$issuer_O" == "issuer= " ]] || [[ "$issuer_CN" == "$CN" ]]; then
if [[ "$issuer_O" == "issuer=" ]] || [[ "$issuer_O" == "issuer= " ]] || [[ "$issuer_CN" == "$cn" ]]; then
pr_svrty_criticalln "self-signed (NOT ok)"
fileout "${json_prefix}issuer" "NOT ok" "Issuer: selfsigned (NOT ok)"
else