Package org.apache.sshd.agent.common
Class AgentDelegate
- java.lang.Object
-
- org.apache.sshd.agent.common.AgentDelegate
-
-
Field Summary
Fields Modifier and Type Field Description private SshAgent
agent
-
Fields inherited from interface org.apache.sshd.agent.SshAgent
SSH_AUTHSOCKET_ENV_NAME
-
-
Constructor Summary
Constructors Constructor Description AgentDelegate(SshAgent agent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIdentity(java.security.KeyPair key, java.lang.String comment)
void
close()
java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,java.lang.String>>
getIdentities()
boolean
isOpen()
void
removeAllIdentities()
void
removeIdentity(java.security.PublicKey key)
byte[]
sign(SessionContext session, java.security.PublicKey key, byte[] data)
-
-
-
Field Detail
-
agent
private final SshAgent agent
-
-
Constructor Detail
-
AgentDelegate
public AgentDelegate(SshAgent agent)
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.nio.channels.Channel
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getIdentities
public java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,java.lang.String>> getIdentities() throws java.io.IOException
- Specified by:
getIdentities
in interfaceSshAgent
- Throws:
java.io.IOException
-
sign
public byte[] sign(SessionContext session, java.security.PublicKey key, byte[] data) throws java.io.IOException
-
addIdentity
public void addIdentity(java.security.KeyPair key, java.lang.String comment) throws java.io.IOException
- Specified by:
addIdentity
in interfaceSshAgent
- Throws:
java.io.IOException
-
removeIdentity
public void removeIdentity(java.security.PublicKey key) throws java.io.IOException
- Specified by:
removeIdentity
in interfaceSshAgent
- Throws:
java.io.IOException
-
removeAllIdentities
public void removeAllIdentities() throws java.io.IOException
- Specified by:
removeAllIdentities
in interfaceSshAgent
- Throws:
java.io.IOException
-
-