summaryrefslogtreecommitdiffhomepage
path: root/tests/test_transport.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2022-04-22 19:11:03 -0400
committerJeff Forcier <jeff@bitprophet.org>2022-04-22 19:12:32 -0400
commit7a2c84afaada7a513ee482ba36e8848528b6f5f3 (patch)
tree2494ec3ce75a1360800531deb33e3593198e6377 /tests/test_transport.py
parent239d2bd7a620be5cdaaa26f981ea72f5f55c9050 (diff)
Add -cert-v01@openssh.com variants to accepted host key algorithms
Solves #2035
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r--tests/test_transport.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 77ffd6c1..2eb95b31 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -1121,7 +1121,12 @@ class AlgorithmDisablingTests(unittest.TestCase):
t = Transport(sock=Mock())
assert t.preferred_ciphers == t._preferred_ciphers
assert t.preferred_macs == t._preferred_macs
- assert t.preferred_keys == t._preferred_keys
+ assert t.preferred_keys == tuple(
+ t._preferred_keys
+ + tuple(
+ "{}-cert-v01@openssh.com".format(x) for x in t._preferred_keys
+ )
+ )
assert t.preferred_kex == t._preferred_kex
def test_preferred_lists_filter_disabled_algorithms(self):
@@ -1140,6 +1145,7 @@ class AlgorithmDisablingTests(unittest.TestCase):
assert "hmac-md5" not in t.preferred_macs
assert "ssh-dss" in t._preferred_keys
assert "ssh-dss" not in t.preferred_keys
+ assert "ssh-dss-cert-v01@openssh.com" not in t.preferred_keys
assert "diffie-hellman-group14-sha256" in t._preferred_kex
assert "diffie-hellman-group14-sha256" not in t.preferred_kex