File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ def ca() -> CA:
57
57
def server_context (ca : CA ) -> SSLContext :
58
58
server_context = ssl .create_default_context (ssl .Purpose .CLIENT_AUTH )
59
59
if hasattr (ssl , "OP_IGNORE_UNEXPECTED_EOF" ):
60
- server_context .options ^= (
61
- ssl .OP_IGNORE_UNEXPECTED_EOF # type: ignore[attr-defined]
62
- )
60
+ server_context .options ^= ssl .OP_IGNORE_UNEXPECTED_EOF
63
61
64
62
ca .issue_cert ("localhost" ).configure_cert (server_context )
65
63
return server_context
@@ -69,9 +67,7 @@ def server_context(ca: CA) -> SSLContext:
69
67
def client_context (ca : CA ) -> SSLContext :
70
68
client_context = ssl .create_default_context (ssl .Purpose .SERVER_AUTH )
71
69
if hasattr (ssl , "OP_IGNORE_UNEXPECTED_EOF" ):
72
- client_context .options ^= (
73
- ssl .OP_IGNORE_UNEXPECTED_EOF # type: ignore[attr-defined]
74
- )
70
+ client_context .options ^= ssl .OP_IGNORE_UNEXPECTED_EOF
75
71
76
72
ca .configure_trust (client_context )
77
73
return client_context
You can’t perform that action at this time.
0 commit comments