diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d86b6a..4a953f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### 0.2.12 - Performence improvement, details see [benchmark/README.md](benchmark/README.md). +- Fix `AttributeError: 'Connection' object has no attribute 'ssl'` in `sha256_password` auth branch. (#147) ### 0.2.11 diff --git a/asyncmy/connection.pyx b/asyncmy/connection.pyx index a3bf521..eaeb2c3 100644 --- a/asyncmy/connection.pyx +++ b/asyncmy/connection.pyx @@ -822,7 +822,7 @@ class Connection: authresp = auth.scramble_caching_sha2(self._password, self.salt) elif self._auth_plugin_name == "sha256_password": plugin_name = b"sha256_password" - if self.ssl and self.server_capabilities & SSL: + if self._ssl_context and self.server_capabilities & SSL: authresp = self._password + b"\0" elif self._password: authresp = b"\1" # request public key