TLS fixes for C/C 3.4.x

- Always set/unset peer certificate verification flag
- Return None (instead of raising an exception) for tls connection
  properties if TLS is not in use
- bumped version number to 1.1.11
This commit is contained in:
Georg Richter
2024-09-16 10:13:38 +02:00
parent afb3ccd778
commit 1d03be3483
4 changed files with 18 additions and 8 deletions

View File

@ -579,14 +579,18 @@ class Connection(mariadb._mariadb.connection):
"""TLS cipher suite if a secure connection is used."""
self._check_closed()
return self._mariadb_get_info(INFO.SSL_CIPHER)
if self._tls:
return self._mariadb_get_info(INFO.SSL_CIPHER)
return None
@property
def tls_version(self):
"""TLS protocol version if a secure connection is used."""
self._check_closed()
return self._mariadb_get_info(INFO.TLS_VERSION)
if self._tls:
return self._mariadb_get_info(INFO.TLS_VERSION)
return None
@property
def server_status(self):