Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2810

SSL_CERT_FILE variable does not work with pyOpenSSL on Windows

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.12.1
    • Affects Version/s: None
    • Component/s: None
    • None

      SSL_CERT_FILE variable does not work with pyOpenSSL on Windows. After PYTHON-2798, the test_validation_with_system_ca_certs is failing on the pyOpenSSL Windows test variants:

       [2021/07/13 06:57:08.687] ERROR: test_validation_with_system_ca_certs (test_ssl.TestSSL)
       [2021/07/13 06:57:08.687] ----------------------------------------------------------------------
       [2021/07/13 06:57:08.687] Traceback (most recent call last):
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\test\__init__.py", line 503, in wrap
       [2021/07/13 06:57:08.687]     return f(*args, **kwargs)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\test\__init__.py", line 503, in wrap
       [2021/07/13 06:57:08.687]     return f(*args, **kwargs)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\test\utils.py", line 777, in wrapper
       [2021/07/13 06:57:08.687]     return wrapped(*args, **kwargs)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\test\test_ssl.py", line 472, in test_validation_with_system_ca_certs
       [2021/07/13 06:57:08.687]     connected(MongoClient('server',
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\test\utils.py", line 703, in connected
       [2021/07/13 06:57:08.687]     client.admin.command('ping')  # Force connection.
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\database.py", line 751, in command
       [2021/07/13 06:57:08.687]     with self.__client._socket_for_reads(
       [2021/07/13 06:57:08.687]   File "C:\python\Python39\Lib\contextlib.py", line 117, in __enter__
       [2021/07/13 06:57:08.687]     return next(self.gen)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\mongo_client.py", line 1387, in _socket_for_reads
       [2021/07/13 06:57:08.687]     server = self._select_server(read_preference, session)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\mongo_client.py", line 1346, in _select_server
       [2021/07/13 06:57:08.687]     server = topology.select_server(server_selector)
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\topology.py", line 244, in select_server
       [2021/07/13 06:57:08.687]     return random.choice(self.select_servers(selector,
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\topology.py", line 202, in select_servers
       [2021/07/13 06:57:08.687]     server_descriptions = self._select_servers_loop(
       [2021/07/13 06:57:08.687]   File "C:\data\mci\f041fb8c75a40e83dddecb5a296a84b1\src\pymongo\topology.py", line 218, in _select_servers_loop
       [2021/07/13 06:57:08.687]     raise ServerSelectionTimeoutError(
       [2021/07/13 06:57:08.687] pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: server:27018: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')], Timeout: 0.1s, Topology Description: <TopologyDescription id: 60ed393b89299fc18a00076a, topology_type: Single, servers: [<ServerDescription ('server', 27018) server_type: Unknown, rtt: None, error=AutoReconnect("SSL handshake failed: server:27018: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]")>]>
      

      https://evergreen.mongodb.com/task/mongo_python_driver_3.12_tests_pyopenssl_windows__platform~windows_64_vsMulti_small_auth~auth_ssl~ssl_python_version_windows~3.9_pyopenssl~enabled_test_2.6_replica_set_da975723f60b52fe6598d2f6118dc3b37d2779a2_21_07_13_00_16_41

      We should skip this test on Windows with using pyOpenSSL.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: