File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1685,6 +1685,7 @@ def handle_connect(self):
16851685 if not self .custom_configuration ['starttls' ]:
16861686 # noinspection PyTypeChecker
16871687 ssl_context = ssl .create_default_context (purpose = ssl .Purpose .SERVER_AUTH )
1688+ ssl_context .minimum_version = ssl .TLSVersion .TLSv1_2 # GitHub CodeQL issue 1
16881689 super ().set_socket (ssl_context .wrap_socket (self .socket , server_hostname = self .server_address [0 ],
16891690 suppress_ragged_eofs = True , do_handshake_on_connect = False ))
16901691 self .set_ssl_connection (True )
@@ -1956,6 +1957,7 @@ def process_data(self, byte_data):
19561957 if str_data .startswith ('220' ):
19571958 # noinspection PyTypeChecker
19581959 ssl_context = ssl .create_default_context (purpose = ssl .Purpose .SERVER_AUTH )
1960+ ssl_context .minimum_version = ssl .TLSVersion .TLSv1_2 # GitHub CodeQL issue 2
19591961 super ().set_socket (ssl_context .wrap_socket (self .socket , server_hostname = self .server_address [0 ],
19601962 suppress_ragged_eofs = True , do_handshake_on_connect = False ))
19611963 self .set_ssl_connection (True )
You can’t perform that action at this time.
0 commit comments