diff options
-rw-r--r-- | paramiko/ecdsakey.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index 6ae2d277..0d47a3ba 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -21,6 +21,8 @@ L{ECDSAKey} """ import binascii +import hashlib + from ecdsa import SigningKey, VerifyingKey, der, curves from Crypto.Hash import SHA256 from ecdsa.test_pyecdsa import ECDSA @@ -98,9 +100,8 @@ class ECDSAKey (PKey): return self.signing_key is not None def sign_ssh_data(self, rpool, data): - digest = SHA256.new(data).digest() - sig = self.signing_key.sign_digest(digest, entropy=rpool.read, - sigencode=self._sigencode) + sig = self.signing_key.sign_deterministic( + data, sigencode=self._sigencode, hashfunc=hashlib.sha256) m = Message() m.add_string('ecdsa-sha2-nistp256') m.add_string(sig) |