Merge pull request #1629 from dcooper16/bad_exponent_rating

Rate RSA e=1 as CRITICAL
This commit is contained in:
Dirk Wetter 2020-05-08 17:13:09 +02:00 committed by GitHub
commit 4f868a76a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8535,9 +8535,14 @@ certificate_info() {
cert_spki_info="$(strip_leading_space "$cert_spki_info")"
cert_spki_info="${cert_spki_info%%[[:space:]]*}"
if [[ -n "$cert_spki_info" ]]; then
out " (exponent is $cert_spki_info)"
if [[ $cert_spki_info -eq 1 ]]; then
out " (exponent is "; pr_svrty_critical "$cert_spki_info"; out ")"
json_rating="CRITICAL"
set_grade_cap "F" "RSA certificate uses exponent of 1"
else
out " (exponent is $cert_spki_info)"
fi
json_msg+=" (exponent is $cert_spki_info)"
[[ $cert_spki_info -eq 1 ]] && set_grade_cap "F" "RSA certificate uses exponent of 1"
fi
;;
"EC") cert_spki_info="${cert_txt##*Subject Public Key Info:}"