diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2021-12-24 12:58:25 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2021-12-24 12:58:25 -0500 |
commit | 69fb31fcc14fef16b612d18b78016e74732b2de3 (patch) | |
tree | 37061d5c067b4b39c9023fcc348b80aecfc68288 /tests | |
parent | c42311a4b1c905c7a3ee129258490448e6e22203 (diff) |
Changelog and test re #1955
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_transport.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py index 6145e5cb..77ffd6c1 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -1438,3 +1438,16 @@ class TestSHA2SignaturePubkeys(unittest.TestCase): ) as (tc, ts): assert tc.is_authenticated() assert tc._agreed_pubkey_algorithm == "rsa-sha2-256" + + def test_sha2_256_when_client_only_enables_256(self): + privkey = RSAKey.from_private_key_file(_support("test_rsa.key")) + with server( + pubkeys=[privkey], + connect=dict(pkey=privkey), + # Client-side only; server still accepts all 3. + client_init=dict( + disabled_algorithms=dict(pubkeys=["ssh-rsa", "rsa-sha2-512"]) + ), + ) as (tc, ts): + assert tc.is_authenticated() + assert tc._agreed_pubkey_algorithm == "rsa-sha2-256" |