You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2020-01-02.15:09:12.015>labels= ['type-bug', '3.8', '3.9', '3.10', '3.11', 'expert-asyncio']
title='asyncio.open_connection returns a closed client when server fails to authenticate client certificate'updated_at=<Date2021-04-21.06:36:33.422>user='https://bugs.python.org/JonathanMartin'
I'm trying to use SSL to validate clients connecting a an asyncio socket server by specifying CERT_REQUIRED and giving a cafile containing the client certificate to allow. client and server code attached.
Observed behavior with python 3.7.5 and openSSL 1.1.1d
------------------------------------------------------
When the client tries to connect without specifying a certificate, the call to asyncio.open_connection succeeds, but the received socket is closed right away, or to be more exact an EOF is received.
Observed behavior with python 3.7.4 and openSSL 1.0.2t
------------------------------------------------------
When the client tries to connect without specifying a certificate, the call to asyncio.open_connection fails.
Expected behavior
-----------------
I'm not sure which behavior is to be considered the expected one, although I would prefer to connection to fail directly instead of returning a dead client. Wouldn't it be better to have only one behavior?
Note that when disabling TLSv1.3, the connection does fail to open:
ctx.maximum_version = ssl.TLSVersion.TLSv1_2
This can be reproduces on all latest releases of 3.6, 3.7, and 3.8 (which all have openssl 1.1.1d in my case)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: