(self)
| 4261 | |
| 4262 | @unittest.expectedFailure # TODO: RUSTPYTHON; + TLSV1_ALERT_ACCESS_DENIED |
| 4263 | def test_sni_callback_alert(self): |
| 4264 | # Returning a TLS alert is reflected to the connecting client |
| 4265 | server_context, other_context, client_context = self.sni_contexts() |
| 4266 | |
| 4267 | def cb_returning_alert(ssl_sock, server_name, initial_context): |
| 4268 | return ssl.ALERT_DESCRIPTION_ACCESS_DENIED |
| 4269 | server_context.set_servername_callback(cb_returning_alert) |
| 4270 | with self.assertRaises(ssl.SSLError) as cm: |
| 4271 | stats = server_params_test(client_context, server_context, |
| 4272 | chatty=False, |
| 4273 | sni_name='supermessage') |
| 4274 | self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_ACCESS_DENIED') |
| 4275 | |
| 4276 | @unittest.expectedFailure # TODO: RUSTPYTHON |
| 4277 | def test_sni_callback_raising(self): |
nothing calls this directly
no test coverage detected