Initialize PyCrypto's RNG (We don't actually use the RNG, but this should prevent certain errors if libcloud is running in a fork of an application that has already imported the Crypto library.)
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/98636e3d Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/98636e3d Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/98636e3d Branch: refs/heads/trunk Commit: 98636e3dd3b29d5f333a99cb97fd279cb5754178 Parents: d08d96b Author: Rick Wright <[email protected]> Authored: Mon Dec 16 15:52:19 2013 -0800 Committer: Rick Wright <[email protected]> Committed: Thu Jan 2 23:30:03 2014 -0800 ---------------------------------------------------------------------- libcloud/common/google.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/98636e3d/libcloud/common/google.py ---------------------------------------------------------------------- diff --git a/libcloud/common/google.py b/libcloud/common/google.py index 549ba8b..da3b66d 100644 --- a/libcloud/common/google.py +++ b/libcloud/common/google.py @@ -82,6 +82,8 @@ try: from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 + import Crypto.Random + Crypto.Random.atfork() except ImportError: # The pycrypto library is unavailable SHA256 = None
