diff options
| author | Bob Halley <halley@nominum.com> | 2009-06-23 18:23:46 +0100 |
|---|---|---|
| committer | Bob Halley <halley@nominum.com> | 2009-06-23 18:23:46 +0100 |
| commit | cd9547c33612e6992c598b61359dfe46a0f56ab6 (patch) | |
| tree | f11a94a43f24d1f14b6fa509080da10565cad1df | |
| parent | 1451d63c171e1735aa5694b2dc7e400c5c0263d2 (diff) | |
| download | dnspython-cd9547c33612e6992c598b61359dfe46a0f56ab6.tar.gz | |
Open /dev/random unbuffered
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | dns/entropy.py | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2009-06-23 Bob Halley <halley@dnspython.org> + + * dns/entropy.py (EntropyPool.__init__): open /dev/random unbuffered; + there's no need to consume more randomness than we need. Thanks + to Brian Wellington for the patch. + 2009-06-19 Bob Halley <halley@dnspython.org> * (Version 1.7.1 released) diff --git a/dns/entropy.py b/dns/entropy.py index ecbb48d..83262f4 100644 --- a/dns/entropy.py +++ b/dns/entropy.py @@ -22,7 +22,7 @@ class EntropyPool(object): self.next_byte = 0 if seed is None: try: - r = file('/dev/random') + r = file('/dev/random', 'r', 0) try: seed = r.read(16) finally: |
