Skip to content

Commit d1829c8

Browse files
committed
Update test_ssl.py
1 parent 7c2bacf commit d1829c8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_ssl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,13 @@ def _get_openssl_error_lib():
327327
if ctypes is None:
328328
raise unittest.SkipTest("ctypes is required")
329329

330+
# Try _ssl first: it is already loaded and linked to the correct
331+
# OpenSSL/AWS-LC. Falling back to find_library() may locate a
332+
# different system libcrypto and abort the process (macOS).
330333
for candidate in (
334+
_ssl.__file__,
331335
ctypes.util.find_library("crypto"),
332336
ctypes.util.find_library("ssl"),
333-
_ssl.__file__,
334337
):
335338
if not candidate:
336339
continue

0 commit comments

Comments
 (0)