diff options
author | Kali Kaneko <kali@leap.se> | 2016-03-09 12:54:22 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-03-09 12:54:22 -0400 |
commit | df901569fc77d7c990b6da8546a21e7a8957a5e7 (patch) | |
tree | d19542c374430f6c4d6fa88ffe009f166553b9af /src/leap | |
parent | 8a828b7a2158c01215c3cbab006caa694a41af03 (diff) |
[bug] specify openssl backend explicitely
for some reason, available_backends does not work inside a frozen
PyInstaller binary.
- Resolves: #7952
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/mail/walk.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/mail/walk.py b/src/leap/mail/walk.py index 8693bdd..b2aa304 100644 --- a/src/leap/mail/walk.py +++ b/src/leap/mail/walk.py @@ -17,14 +17,16 @@ """ Utilities for walking along a message tree. """ -from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.backends.multibackend import MultiBackend +from cryptography.hazmat.backends.openssl.backend import Backend as OpenSSLBackend from cryptography.hazmat.primitives import hashes from leap.mail.utils import first def get_hash(s): - digest = hashes.Hash(hashes.SHA256(), default_backend()) + backend = MultiBackend([OpenSSLBackend()]) + digest = hashes.Hash(hashes.SHA256(), backend) digest.update(s) return digest.finalize().encode("hex").upper() |