summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-03-29 19:22:36 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-03-29 19:22:36 -0700
commit6f211115f49edcea7d23b764d7cf3a84ff12f5f0 (patch)
tree093859d4a75d3ccb361974439f61a01e7dc2b2b4 /test.py
parent5a430def22aa5cbd755f347c8714e4140d6cdcab (diff)
downloadparamiko-6f211115f49edcea7d23b764d7cf3a84ff12f5f0.tar.gz
Switch from using PyCrypto's Random to using os.urandom.
There's several reasons for this change: 1) It's faster for reads up to 1024 bytes (nearly 10x faster for 16 byte reads) 2) It receives considerably more security review since it's in the kernel. 3) It's yet another step towards running on PyPy. 4) Using userspace CSPRNGs is considered something of an anti-pattern. See: http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ http://webcache.googleusercontent.com/search?q=cache:2nTvpCgKZXIJ:www.2uo.de/myths-about-urandom/+&cd=3&hl=en&ct=clnk&gl=us
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.py b/test.py
index bd966d1e..2b3d4ed4 100755
--- a/test.py
+++ b/test.py
@@ -101,12 +101,12 @@ def main():
parser.add_option('-P', '--sftp-passwd', dest='password', type='string', default=default_passwd,
metavar='<password>',
help='[with -R] (optional) password to unlock the private key for remote sftp tests')
-
+
options, args = parser.parse_args()
-
+
# setup logging
paramiko.util.log_to_file('test.log')
-
+
if options.use_sftp:
from tests.test_sftp import SFTPTest
if options.use_loopback_sftp: