(self)
| 515 | ssl_support.HAVE_WINCERTSTORE = have_wincertstore |
| 516 | |
| 517 | def test_wincertstore(self): |
| 518 | if sys.platform != "win32": |
| 519 | raise SkipTest("Only valid on Windows.") |
| 520 | if hasattr(ssl, "SSLContext"): |
| 521 | # SSLSocket doesn't provide ca_certs attribute on pythons |
| 522 | # with SSLContext and SSLContext provides no information |
| 523 | # about ca_certs. |
| 524 | raise SkipTest("Can't test when SSLContext available.") |
| 525 | if not ssl_support.HAVE_WINCERTSTORE: |
| 526 | raise SkipTest("Need wincertstore to test wincertstore.") |
| 527 | |
| 528 | ctx = get_ssl_context(None, None, CA_PEM, None, False, False, False, _IS_SYNC) |
| 529 | ssl_sock = ctx.wrap_socket(socket.socket()) |
| 530 | self.assertEqual(ssl_sock.ca_certs, CA_PEM) |
| 531 | |
| 532 | ctx = get_ssl_context(None, None, None, None, False, False, False, _IS_SYNC) |
| 533 | ssl_sock = ctx.wrap_socket(socket.socket()) |
| 534 | self.assertEqual(ssl_sock.ca_certs, ssl_support._WINCERTS.name) |
| 535 | |
| 536 | @async_client_context.require_auth |
| 537 | @async_client_context.require_tlsCertificateKeyFile |
nothing calls this directly
no test coverage detected