diff options
author | David Reid <dreid@dreid.org> | 2013-11-12 13:26:26 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-12 13:26:26 -0800 |
commit | ad3102ad806225448bf7274a2c5893cc74eda98e (patch) | |
tree | e34626b95f861d0b39aacfe7e9dbc17f12ef38ba | |
parent | ee6f8cec48028aeab213404dbce04bb6441a473c (diff) | |
download | cryptography-ad3102ad806225448bf7274a2c5893cc74eda98e.tar.gz cryptography-ad3102ad806225448bf7274a2c5893cc74eda98e.tar.bz2 cryptography-ad3102ad806225448bf7274a2c5893cc74eda98e.zip |
Reflow Hashes.supported.
-rw-r--r-- | cryptography/hazmat/bindings/openssl/backend.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py index 86c6f660..235a8e30 100644 --- a/cryptography/hazmat/bindings/openssl/backend.py +++ b/cryptography/hazmat/bindings/openssl/backend.py @@ -318,9 +318,10 @@ class Hashes(object): self._backend = backend def supported(self, algorithm): - return (self._backend.ffi.NULL != - self._backend.lib.EVP_get_digestbyname( - algorithm.name.encode("ascii"))) + digest = self._backend.lib.EVP_get_digestbyname( + algorithm.name.encode("ascii") + ) + return digest != self._backend.ffi.NULL def create_ctx(self, algorithm): return _HashContext(self._backend, algorithm) |