diff --git a/sshagent/__main__.py b/sshagent/__main__.py index d04975e..213956d 100644 --- a/sshagent/__main__.py +++ b/sshagent/__main__.py @@ -88,7 +88,7 @@ def trezor_agent(): if command: command = ['git'] + command - identity = client.get_identity(label=label, protocol='ssh') + identity = client.get_identity(label=label) public_key = client.get_public_key(identity=identity) use_shell = False @@ -105,7 +105,7 @@ def trezor_agent(): return def signer(label, blob): - identity = client.get_identity(label=label, protocol='ssh') + identity = client.get_identity(label=label) return client.sign_ssh_challenge(identity=identity, blob=blob) try: diff --git a/sshagent/tests/test_trezor.py b/sshagent/tests/test_trezor.py index ecf0323..3479fa9 100644 --- a/sshagent/tests/test_trezor.py +++ b/sshagent/tests/test_trezor.py @@ -80,7 +80,7 @@ SIG = (b'\x00R\x19T\xf2\x84$\xef#\x0e\xee\x04X\xc6\xc3\x99T`\xd1\xd8\xf7!' def test_ssh_agent(): c = client.Client(factory=FactoryMock) - ident = c.get_identity(label='localhost:22', protocol='ssh') + ident = c.get_identity(label='localhost:22') assert ident.host == 'localhost' assert ident.proto == 'ssh' assert ident.port == '22' diff --git a/sshagent/trezor/client.py b/sshagent/trezor/client.py index 589e6e6..ea60d9a 100644 --- a/sshagent/trezor/client.py +++ b/sshagent/trezor/client.py @@ -34,11 +34,9 @@ class Client(object): self.client.clear_session() # forget PIN and shutdown screen self.client.close() - def get_identity(self, label, protocol=None): + def get_identity(self, label): identity = string_to_identity(label, self.factory.identity_type) - if protocol is not None: - identity.proto = protocol - + identity.proto = 'ssh' return identity def get_public_key(self, identity):