This commit is contained in:
@@ -64,8 +64,10 @@ def http_get(ip, ctx):
|
||||
|
||||
def expect(ip, label, ca, cert, key, kind):
|
||||
outcome, detail = http_get(ip, context(ca, cert, key))
|
||||
if kind == "reject-handshake" and outcome == "handshake":
|
||||
print("PASS %s %s handshake rejected (%s)" % (ip, label, detail))
|
||||
if kind == "reject-handshake" and (
|
||||
outcome == "handshake" or (outcome == "closed" and detail in {"SSLError", "SSLEOFError", "OSError"})
|
||||
):
|
||||
print("PASS %s %s handshake rejected (%s %s)" % (ip, label, outcome, detail))
|
||||
return
|
||||
if kind == "reject-http" and outcome != "http" and detail != "200":
|
||||
print("PASS %s %s rejected (%s %s)" % (ip, label, outcome, detail))
|
||||
|
||||
Reference in New Issue
Block a user