From a8c9133fc6632f7a758c7b950d6fc0443384dbe2 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Wed, 6 May 2020 14:25:59 -0400 Subject: [PATCH] Check for RSA exponent of 1 As suggested in #1576, set the grade cap to F if the RSA key has an exponent of 1. --- testssl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/testssl.sh b/testssl.sh index 9daae5a..099dcfd 100755 --- a/testssl.sh +++ b/testssl.sh @@ -8547,6 +8547,7 @@ certificate_info() { if [[ -n "$cert_spki_info" ]]; then out " (exponent is $cert_spki_info)" 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:}"