Commit b1cce673 authored by dieter's avatar dieter

Python 3.10 distinguishes SSL contexts for server and client use - and SSL...

Python 3.10 distinguishes SSL contexts for server and client use - and SSL fails with the wrong context type
parent 4b1f44a3
......@@ -15,7 +15,8 @@ def ssl_config(section, server):
cafile=auth
context = ssl.create_default_context(
ssl.Purpose.CLIENT_AUTH, cafile=cafile, capath=capath)
ssl.Purpose.CLIENT_AUTH if server else ssl.Purpose.SERVER_AUTH,
cafile=cafile, capath=capath)
if not auth:
assert not server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment