equal
deleted
inserted
replaced
551 |
551 |
552 # This config option is intended for use in tests only. It is a giant |
552 # This config option is intended for use in tests only. It is a giant |
553 # footgun to kill security. Don't define it. |
553 # footgun to kill security. Don't define it. |
554 exactprotocol = ui.config(b'devel', b'serverexactprotocol') |
554 exactprotocol = ui.config(b'devel', b'serverexactprotocol') |
555 if exactprotocol == b'tls1.0': |
555 if exactprotocol == b'tls1.0': |
|
556 if b'tls1.0' not in supportedprotocols: |
|
557 raise error.Abort(_(b'TLS 1.0 not supported by this Python')) |
556 protocol = ssl.PROTOCOL_TLSv1 |
558 protocol = ssl.PROTOCOL_TLSv1 |
557 elif exactprotocol == b'tls1.1': |
559 elif exactprotocol == b'tls1.1': |
558 if b'tls1.1' not in supportedprotocols: |
560 if b'tls1.1' not in supportedprotocols: |
559 raise error.Abort(_(b'TLS 1.1 not supported by this Python')) |
561 raise error.Abort(_(b'TLS 1.1 not supported by this Python')) |
560 protocol = ssl.PROTOCOL_TLSv1_1 |
562 protocol = ssl.PROTOCOL_TLSv1_1 |