(self, ctx)
| 1506 | self.assertEqual(ctx.cert_store_stats(), stats) |
| 1507 | |
| 1508 | def _assert_context_options(self, ctx): |
| 1509 | self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2) |
| 1510 | if OP_NO_COMPRESSION != 0: |
| 1511 | self.assertEqual(ctx.options & OP_NO_COMPRESSION, |
| 1512 | OP_NO_COMPRESSION) |
| 1513 | if OP_SINGLE_DH_USE != 0: |
| 1514 | self.assertEqual(ctx.options & OP_SINGLE_DH_USE, |
| 1515 | OP_SINGLE_DH_USE) |
| 1516 | if OP_SINGLE_ECDH_USE != 0: |
| 1517 | self.assertEqual(ctx.options & OP_SINGLE_ECDH_USE, |
| 1518 | OP_SINGLE_ECDH_USE) |
| 1519 | if OP_CIPHER_SERVER_PREFERENCE != 0: |
| 1520 | self.assertEqual(ctx.options & OP_CIPHER_SERVER_PREFERENCE, |
| 1521 | OP_CIPHER_SERVER_PREFERENCE) |
| 1522 | self.assertEqual(ctx.options & ssl.OP_LEGACY_SERVER_CONNECT, |
| 1523 | 0 if IS_OPENSSL_3_0_0 else ssl.OP_LEGACY_SERVER_CONNECT) |
| 1524 | |
| 1525 | def test_create_default_context(self): |
| 1526 | ctx = ssl.create_default_context() |
no test coverage detected