Commit Graph

39 Commits

Author SHA1 Message Date
Alex Gaynor 191fd465f1 Merge branch 'master' into use-urandom
Conflicts:
	paramiko/dsskey.py
	paramiko/ecdsakey.py
	paramiko/hostkeys.py
	paramiko/kex_gex.py
	paramiko/kex_group1.py
	paramiko/pkey.py
	paramiko/primes.py
	paramiko/rsakey.py
	tests/test_pkey.py
2014-04-14 10:56:05 -04:00
Alex Gaynor 6f211115f4 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
2014-03-29 19:22:36 -07:00
Alex Gaynor 4d3e0b711a Switched hash functions from PyCrypto to hashlib.
There's a few advantages to this:

1) It's probably fast, OpenSSL, which typically backs hashlib, receives far
   more attention for optimizaitons than PyCrypto.
2) It's the first step to supporting PyPy, where PyCrypto doesn't run.
2014-03-29 16:55:01 -07:00
Scott Maxwell f0017b8330 Fix import * and a bunch of PEP8 formatting 2014-03-07 20:45:26 -08:00
Scott Maxwell 6d75c75e64 Remove byte conversions and unhexlify calls that we only needed for Py2.5 support and use the `b` byte string marker instead 2013-11-19 10:09:08 -08:00
Scott Maxwell 2da5f1fb45 Use 'with' for opening most file and SFTPFIle objects 2013-11-19 08:56:53 -08:00
Scott Maxwell 7444a99993 Fix some deprecation and resource warnings 2013-11-02 20:19:04 -07:00
Scott Maxwell fcf56ff9f8 Fix bytes/str type in more places 2013-10-31 10:01:21 -07:00
Scott Maxwell 0b7d0cf0a2 Convert and detect types properly, use helper constants, use StringIO and range 2013-10-30 17:14:52 -07:00
Scott Maxwell 2ea352b8ba Fix dict iters, sorts, exceptions, bytes renames and tuple args 2013-10-30 16:46:33 -07:00
Scott Maxwell 66cfa97cce Fix imports 2013-10-30 16:19:30 -07:00
Jeff Forcier e25c7c4bdf Merge branch '1.9' into 1.10 2013-09-27 21:29:51 -07:00
Jeff Forcier 2de9c72720 Merge branch '1.8' into 1.9 2013-09-27 21:29:41 -07:00
Jeff Forcier 83f44878ea Fixed a typo in the license header of most files
Conflicts:
	paramiko/proxy.py
2013-09-27 21:29:18 -07:00
Jeff Forcier 05abcc40f5 Fix #179 - missing host variable in fqdn evaluation 2013-09-27 16:08:59 -07:00
Olle Lundberg 38767982cd Fix broken test. 2013-02-28 12:36:03 +01:00
Olle Lundberg 109d2b200a Add tests for identityfile parsing. 2013-02-28 12:31:53 +01:00
Olle Lundberg c79e6a3f92 Whitespace fixes. 2013-02-28 12:14:59 +01:00
Olle Lundberg b3d5156019 Add tests for proxycommand parsing. 2013-02-28 12:10:55 +01:00
Olle Lundberg 21689d9647 Add test for host negation. 2013-02-28 12:06:51 +01:00
Olle Lundberg 98ae4e975d Updated tests for new ssh config format. 2013-02-28 12:05:03 +01:00
Jeff Forcier 191a5fc08c Implement (& test for) ProxyCommand interpolation.
Forgot this earlier.
2012-11-05 17:44:25 -08:00
Jeff Forcier 928c062748 Add failing test(s) re ProxyCommand config parsing 2012-11-05 17:04:52 -08:00
Jeff Forcier dfb45dec7f Refactoring: it's a thing. Re #85 2012-10-15 13:21:58 -07:00
Jeff Forcier 2d7355da5e Fix module import in tests 2012-09-25 18:11:30 -07:00
Douglas Turk 681a465f32 Handle/fix handling of EINTR errors in a few places.
(cherry picked from commit 351bdb72e539c373985e108c89f61839f3acdd2a)

Conflicts:
	paramiko/agent.py
	paramiko/client.py
	paramiko/transport.py
2012-09-24 18:58:54 -07:00
Jan Brauer d18b8cf1e9 Fix #33 - parse config as described by manpage
(cherry picked from commit 011805eae07ee7be6140b95f6d8669763c55b3d9)
2012-09-23 16:45:49 -07:00
Jeff Forcier f04ddd420d Fix broken tests
(cherry picked from commit 00e1072ee5abbc92b5df57e10cadb638d583d971)

Conflicts:
	tests/test_util.py
2012-09-23 16:45:28 -07:00
Gary van der Merwe 044e702998 Use Crypto.Random rather than Crypto.Util.RandomPool. 2010-08-03 00:13:08 +02:00
Robey Pointer 60c6e94e7d fix my email address to be the current one. 2009-07-19 19:45:02 -07:00
Robey Pointer 7ebda9a76d [project @ robey@lag.net-20080220060030-jih2gfguzp6jbwog]
verify WarningPolicy is exported
2008-02-19 22:00:30 -08:00
Robey Pointer 9e67c45053 [project @ robey@lag.net-20080218051229-xtylb1poe246k2ci]
merge patch from Dwayne Litzenberger to fix unit tests on python 2.3.
2008-02-17 21:12:29 -08:00
Robey Pointer d81e0038d2 [project @ robey@lag.net-20080218024139-i2t8y0f0dd93xjo1]
bug 189466: fix typo in osrandom.py (from patch in bug report) and add a
friggin' unit test.
2008-02-17 18:41:39 -08:00
Robey Pointer 83b335e10f [project @ robey@lag.net-20070213191706-v8djxd4jiunb3his]
bump copyright year to 2007
2007-02-13 11:17:06 -08:00
Robey Pointer 929ce8df7a [project @ robey@lag.net-20060813195045-ca4148e233794d4b]
add a unit test to verify that all the paramiko symbols are exported correctly
2006-08-13 12:50:45 -07:00
Robey Pointer 074dc36e6b [project @ robey@lag.net-20060801182143-088ff687e0945937]
use hexlify in tests
2006-08-01 11:21:43 -07:00
Robey Pointer 02e8178510 [project @ robey@lag.net-20060508005224-a8a04cd59f9fa016]
pulled out openssh config parsing into its own class
2006-05-07 17:52:24 -07:00
Robey Pointer 409c4fc482 [project @ robey@lag.net-20060220003513-aa54e3e771a530fd]
add HostKeys, a helper for reading/parsing openssh known_hosts files, including hashed-host support
2006-02-19 16:35:13 -08:00
Robey Pointer a8abbbecb8 [project @ robey@lag.net-20051204090414-7c8318ab735f6188]
experimental util functions for parsing/getting openssh host config, and unit tests (turned out to be pretty easy)
2005-12-04 01:04:14 -08:00