(self)
| 945 | self.assertNotIn("3DES", name) |
| 946 | |
| 947 | def test_get_ciphers(self): |
| 948 | ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) |
| 949 | ctx.set_ciphers('AESGCM') |
| 950 | names = set(d['name'] for d in ctx.get_ciphers()) |
| 951 | expected = { |
| 952 | 'AES128-GCM-SHA256', |
| 953 | 'ECDHE-ECDSA-AES128-GCM-SHA256', |
| 954 | 'ECDHE-RSA-AES128-GCM-SHA256', |
| 955 | 'DHE-RSA-AES128-GCM-SHA256', |
| 956 | 'AES256-GCM-SHA384', |
| 957 | 'ECDHE-ECDSA-AES256-GCM-SHA384', |
| 958 | 'ECDHE-RSA-AES256-GCM-SHA384', |
| 959 | 'DHE-RSA-AES256-GCM-SHA384', |
| 960 | } |
| 961 | intersection = names.intersection(expected) |
| 962 | self.assertGreaterEqual( |
| 963 | len(intersection), 2, f"\ngot: {sorted(names)}\nexpected: {sorted(expected)}" |
| 964 | ) |
| 965 | |
| 966 | def test_options(self): |
| 967 | # Test default SSLContext options |
nothing calls this directly
no test coverage detected