1 parent 1da1445 commit 1fcc536Copy full SHA for 1fcc536
1 file changed
check_https.py
@@ -169,7 +169,11 @@ def check_secure_connection(info):
169
secure_sock.close()
170
msg = "A verified TLS connection can be established. "
171
if info.ssllabs_grade is not None:
172
- msg += "<a href=\"https://www.ssllabs.com/ssltest/analyze.html?d={}\">SSL Labs grade</a> is " + info.ssllabs_grade + "."
+ grade_msg = "<a href=\"https://www.ssllabs.com/ssltest/analyze.html?d={}\">SSL Labs grade</a> is " + info.ssllabs_grade + "."
173
+ if info.ssllabs_grade == "F":
174
+ good_connection.fail(grade_msg.format(info.domain))
175
+ return
176
+ msg += grade_msg
177
else:
178
msg += "(<a href=\"https://www.ssllabs.com/ssltest/analyze.html?d={}\">SSL Labs report</a>)"
179
info.secure_connection_works = True
0 commit comments