Connecting to a TLSv1.2 server with various client options. Testing against older TLS versions.
(self)
| 3421 | |
| 3422 | @requires_tls_version('TLSv1_2') |
| 3423 | def test_protocol_tlsv1_2(self): |
| 3424 | """Connecting to a TLSv1.2 server with various client options. |
| 3425 | Testing against older TLS versions.""" |
| 3426 | if support.verbose: |
| 3427 | sys.stdout.write("\n") |
| 3428 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2', |
| 3429 | server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2, |
| 3430 | client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,) |
| 3431 | if has_tls_version('SSLv3'): |
| 3432 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv3, False) |
| 3433 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLS, False, |
| 3434 | client_options=ssl.OP_NO_TLSv1_2) |
| 3435 | |
| 3436 | try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') |
| 3437 | if has_tls_protocol(ssl.PROTOCOL_TLSv1): |
| 3438 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) |
| 3439 | try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) |
| 3440 | if has_tls_protocol(ssl.PROTOCOL_TLSv1_1): |
| 3441 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) |
| 3442 | try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) |
| 3443 | |
| 3444 | def test_starttls(self): |
| 3445 | """Switching from clear text to encrypted and back again.""" |
nothing calls this directly
no test coverage detected