Щербацевич-БПИ2302-на 3
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-27 22:15:42 +03:00
parent bd3a530df3
commit 579bcc0b97
13 changed files with 271 additions and 121 deletions
+4 -2
View File
@@ -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))