When the handshake fails with stdlib ssl, we raise this error:
File "/home/travis/build/mongodb/mongo-python-driver/pymongo/topology.py", line 209, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: localhost:27017: EOF occurred in violation of protocol (_ssl.c:1108)
When the handshake fails with pyopenssl, we raise this terse error:
File "/Users/shane/git/mongo-python-driver/pymongo/topology.py", line 210, in _select_servers_loop self._error_message(selector)) pymongo.errors.ServerSelectionTimeoutError: (-1, 'Unexpected EOF')
1) We should add suppress_ragged_eofs support to our pyopenssl connection wrapper to better match the errors we get from the stdlib.
2) We should catch pyopenssl handshake errors when wrapping a socket and provide a more detailed error message.
- related to
-
PYTHON-2040 Support PyOpenSSL
- Closed