summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-12-15 22:14:48 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-12-15 22:14:48 -0500
commitbe3ffc18cc466e0b0a877d716721353c12561bcc (patch)
treed24bc9387a7ddea5c8d88c4882212b09a8fd667e /tests
parent352531f803e55e8a5186cd928543279ad1585893 (diff)
Make ext-info faux-KexAlgorithm detection more robust
Diffstat (limited to 'tests')
-rw-r--r--tests/test_transport.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index b2efd637..421c078b 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -1213,10 +1213,14 @@ class TestSHA2SignatureKeyExchange(unittest.TestCase):
class TestExtInfo(unittest.TestCase):
- def test_ext_info_handshake(self):
+ def test_ext_info_handshake_exposed_in_client_kexinit(self):
with server() as (tc, _):
+ # NOTE: this is latest KEXINIT /sent by us/ (Transport retains it)
kex = tc._get_latest_kex_init()
- assert kex["kex_algo_list"][-1] == "ext-info-c"
+ # flag in KexAlgorithms list
+ assert "ext-info-c" in kex["kex_algo_list"]
+ # data stored on Transport after hearing back from a compatible
+ # server (such as ourselves in server mode)
assert tc.server_extensions == {
"server-sig-algs": b"ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss" # noqa
}