Skip to content

Commit

Permalink
Ensure safe defaults for TLS
Browse files Browse the repository at this point in the history
Signed-off-by: Salvatore Mesoraca <[email protected]>
  • Loading branch information
aiven-sal committed Aug 7, 2024
1 parent fb83d2d commit 30cc14c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion valkey/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,9 @@ def _wrap_socket_with_ssl(self, sock):
context.load_verify_locations(
cafile=self.ca_certs, capath=self.ca_path, cadata=self.ca_data
)
if self.ssl_min_version is not None:
if self.ssl_min_version is None:
context.minimum_version = ssl.TLSVersion.TLSv1_2
else:
context.minimum_version = self.ssl_min_version
if self.ssl_ciphers:
context.set_ciphers(self.ssl_ciphers)
Expand Down

0 comments on commit 30cc14c

Please sign in to comment.