Skip to content

Commit 5dca437

Browse files
committed
PYTHON-872 - Can't test loading system CA certs on Windows.
1 parent 330e6c8 commit 5dca437

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_ssl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,14 @@ def test_validation_with_system_ca_certs(self):
454454
raise SkipTest("No hosts entry for 'server'. Cannot validate "
455455
"hostname in the certificate")
456456

457+
if sys.platform == "win32":
458+
raise SkipTest("Can't test system ca certs on Windows.")
459+
457460
if sys.version_info < (2, 7, 9):
458461
raise SkipTest("SSLContext not available.")
459462

460-
if (sys.platform == "win32"
461-
and sys.version_info[0] == 3 and sys.version_info < (3, 4)):
462-
raise SkipTest(
463-
"Python 3 can't load Windows system certs before 3.4")
464463

464+
# Tell OpenSSL where CA certificates live.
465465
os.environ['SSL_CERT_FILE'] = CA_PEM
466466
try:
467467
with self.assertRaises(ConnectionFailure):

0 commit comments

Comments
 (0)