Connecting to a TLSv1.2 server with various client options. Testing against older TLS versions.
(self)
| 3704 | |
| 3705 | @requires_tls_version('TLSv1_2') |
| 3706 | def test_protocol_tlsv1_2(self): |
| 3707 | """Connecting to a TLSv1.2 server with various client options. |
| 3708 | Testing against older TLS versions.""" |
| 3709 | if support.verbose: |
| 3710 | sys.stdout.write("\n") |
| 3711 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2', |
| 3712 | server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2, |
| 3713 | client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,) |
| 3714 | if has_tls_version('SSLv3'): |
| 3715 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv3, False) |
| 3716 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLS, False, |
| 3717 | client_options=ssl.OP_NO_TLSv1_2) |
| 3718 | |
| 3719 | try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2') |
| 3720 | if has_tls_protocol('PROTOCOL_TLSv1'): |
| 3721 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False) |
| 3722 | try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False) |
| 3723 | if has_tls_protocol('PROTOCOL_TLSv1_1'): |
| 3724 | try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False) |
| 3725 | try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False) |
| 3726 | |
| 3727 | def test_starttls(self): |
| 3728 | """Switching from clear text to encrypted and back again.""" |
nothing calls this directly
no test coverage detected