summaryrefslogtreecommitdiff
path: root/paramiko/kex_ecdh_nist.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2021-12-13 15:55:36 -0500
committerJeff Forcier <jeff@bitprophet.org>2021-12-23 00:31:01 -0500
commit363a28d94cada17f012c1604a3c99c71a2bda003 (patch)
tree6979a1d39ced84c3b29d366a0026db5fd9a62851 /paramiko/kex_ecdh_nist.py
parentdfffaeaa0170c784307d1c89dad60528a59b6ff2 (diff)
downloadparamiko-363a28d94cada17f012c1604a3c99c71a2bda003.tar.gz
Add support for RSA SHA2 host and public keys
Includes a handful of refactors and new semiprivate attributes on Transport and AuthHandler for better test visibility.
Diffstat (limited to 'paramiko/kex_ecdh_nist.py')
-rw-r--r--paramiko/kex_ecdh_nist.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/paramiko/kex_ecdh_nist.py b/paramiko/kex_ecdh_nist.py
index ad5c9c79..19de2431 100644
--- a/paramiko/kex_ecdh_nist.py
+++ b/paramiko/kex_ecdh_nist.py
@@ -90,7 +90,9 @@ class KexNistp256:
hm.add_mpint(long(K))
H = self.hash_algo(hm.asbytes()).digest()
self.transport._set_K_H(K, H)
- sig = self.transport.get_server_key().sign_ssh_data(H)
+ sig = self.transport.get_server_key().sign_ssh_data(
+ H, self.transport.host_key_type
+ )
# construct reply
m = Message()
m.add_byte(c_MSG_KEXECDH_REPLY)