(self)
| 1026 | self.assertNotIn("3DES", name) |
| 1027 | |
| 1028 | def test_get_ciphers(self): |
| 1029 | ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) |
| 1030 | ctx.set_ciphers('AESGCM') |
| 1031 | names = set(d['name'] for d in ctx.get_ciphers()) |
| 1032 | expected = { |
| 1033 | 'AES128-GCM-SHA256', |
| 1034 | 'ECDHE-ECDSA-AES128-GCM-SHA256', |
| 1035 | 'ECDHE-RSA-AES128-GCM-SHA256', |
| 1036 | 'DHE-RSA-AES128-GCM-SHA256', |
| 1037 | 'AES256-GCM-SHA384', |
| 1038 | 'ECDHE-ECDSA-AES256-GCM-SHA384', |
| 1039 | 'ECDHE-RSA-AES256-GCM-SHA384', |
| 1040 | 'DHE-RSA-AES256-GCM-SHA384', |
| 1041 | } |
| 1042 | intersection = names.intersection(expected) |
| 1043 | self.assertGreaterEqual( |
| 1044 | len(intersection), 2, f"\ngot: {sorted(names)}\nexpected: {sorted(expected)}" |
| 1045 | ) |
| 1046 | |
| 1047 | def test_set_groups(self): |
| 1048 | ctx = ssl.create_default_context() |
nothing calls this directly
no test coverage detected