Currently, the connect() and from_url() methods have one point of customization for SSL connections in the form of a verify_ssl argument. However, this misses the point as:
The ssl argument can be an ssl.SSLContext instance that can be customized further than just deciding whether or not server-side certificates should be verified.
In order to support such options, and to be future-compatible with any new options introduced to customize ssl.SSLContext instances, I suggest the following:
Drop the verify_ssl argument. It appears to be a short-sighted attempt to deal with the new default SSL policy introduced with newer versions of Python.
Overload the ssl argument to accept ssl.SSLContext instances, and forward such instances to asyncio.create_connection.
Currently, the connect() and from_url() methods have one point of customization for SSL connections in the form of a
verify_ssl
argument. However, this misses the point as:server_hostname
andssl
argumentsssl
argument can be an ssl.SSLContext instance that can be customized further than just deciding whether or not server-side certificates should be verified.In order to support such options, and to be future-compatible with any new options introduced to customize
ssl.SSLContext
instances, I suggest the following:verify_ssl
argument. It appears to be a short-sighted attempt to deal with the new default SSL policy introduced with newer versions of Python.ssl
argument to acceptssl.SSLContext
instances, and forward such instances toasyncio.create_connection
.