Package org.apache.sshd.agent.local
Class AgentImpl
- java.lang.Object
-
- org.apache.sshd.agent.local.AgentImpl
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.agent.SshAgent
SSH_AUTHSOCKET_ENV_NAME
-
-
Constructor Summary
Constructors Constructor Description AgentImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIdentity(KeyPair key, String comment)
void
close()
Iterable<? extends Map.Entry<PublicKey,String>>
getIdentities()
protected static Map.Entry<KeyPair,String>
getKeyPair(Collection<? extends Map.Entry<KeyPair,String>> keys, PublicKey key)
boolean
isOpen()
void
removeAllIdentities()
void
removeIdentity(PublicKey key)
byte[]
sign(SessionContext session, PublicKey key, byte[] data)
-
-
-
Method Detail
-
getIdentities
public Iterable<? extends Map.Entry<PublicKey,String>> getIdentities() throws IOException
- Specified by:
getIdentities
in interfaceSshAgent
- Throws:
IOException
-
sign
public byte[] sign(SessionContext session, PublicKey key, byte[] data) throws IOException
- Specified by:
sign
in interfaceSshAgent
- Throws:
IOException
-
addIdentity
public void addIdentity(KeyPair key, String comment) throws IOException
- Specified by:
addIdentity
in interfaceSshAgent
- Throws:
IOException
-
removeIdentity
public void removeIdentity(PublicKey key) throws IOException
- Specified by:
removeIdentity
in interfaceSshAgent
- Throws:
IOException
-
removeAllIdentities
public void removeAllIdentities() throws IOException
- Specified by:
removeAllIdentities
in interfaceSshAgent
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-