Skip to content

Commit

Permalink
Merge pull request #181 from melor/crypto_deadlock
Browse files Browse the repository at this point in the history
pghoard: workaround for cryptography deadlock bug

#181
  • Loading branch information
saaros committed Jan 16, 2017
2 parents ae8d517 + 589d90d commit 3a357c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pghoard/rohmu/encryptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
from cryptography.hazmat.primitives.hashes import SHA1, SHA256
from cryptography.hazmat.primitives.hmac import HMAC
from cryptography.hazmat.primitives import serialization
import cryptography
import cryptography.hazmat.backends.openssl.backend
import io
import os
import struct


if cryptography.__version__ < "1.6":
# workaround for deadlock https://github.com/pyca/cryptography/issues/2911
cryptography.hazmat.backends.openssl.backend.activate_builtin_random()

FILEMAGIC = b"pghoa1"


Expand Down

0 comments on commit 3a357c9

Please sign in to comment.