client: set identity index explicitly
This commit is contained in:
@@ -79,6 +79,7 @@ def test_ssh_agent():
|
||||
assert ident.port == '22'
|
||||
assert ident.user is None
|
||||
assert ident.path is None
|
||||
assert ident.index == 0
|
||||
|
||||
with c:
|
||||
assert c.get_public_key(label) == PUBKEY_TEXT
|
||||
|
||||
@@ -18,6 +18,7 @@ class Client(object):
|
||||
self.identity_type = client_wrapper.identity_type
|
||||
self.device_name = client_wrapper.device_name
|
||||
self.curve = curve
|
||||
self.identity_index = 0
|
||||
|
||||
def __enter__(self):
|
||||
msg = 'Hello World!'
|
||||
@@ -32,6 +33,7 @@ class Client(object):
|
||||
def get_identity(self, label):
|
||||
identity = string_to_identity(label, self.identity_type)
|
||||
identity.proto = 'ssh'
|
||||
identity.index = self.identity_index
|
||||
return identity
|
||||
|
||||
def get_public_key(self, label):
|
||||
|
||||
Reference in New Issue
Block a user