protocol: fail on unsupported commands

This commit is contained in:
Roman Zeyde
2016-03-12 20:38:37 +02:00
parent 000860feaf
commit ea88f425f5
3 changed files with 74 additions and 21 deletions

View File

@@ -22,6 +22,12 @@ def test_list():
assert reply == LIST_NIST256_REPLY
def test_unsupported():
h = protocol.Handler(keys=[], signer=None)
reply = h.handle(b'\x09')
assert reply == b'\x00\x00\x00\x01\x05'
def ecdsa_signer(label, blob):
assert label == 'ssh://localhost'
assert blob == NIST256_BLOB