Package org.apache.sshd.agent.local
Class AgentImpl
- java.lang.Object
-
- org.apache.sshd.agent.local.AgentImpl
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.util.Map.Entry<java.security.KeyPair,java.lang.String>>
keys
private java.util.concurrent.atomic.AtomicBoolean
open
-
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(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()
protected static java.util.Map.Entry<java.security.KeyPair,java.lang.String>
getKeyPair(java.util.Collection<? extends java.util.Map.Entry<java.security.KeyPair,java.lang.String>> keys, java.security.PublicKey key)
boolean
isOpen()
void
removeAllIdentities()
void
removeIdentity(java.security.PublicKey key)
byte[]
sign(SessionContext session, java.security.PublicKey key, byte[] data)
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interfacejava.nio.channels.Channel
-
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
-
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
-
getKeyPair
protected static java.util.Map.Entry<java.security.KeyPair,java.lang.String> getKeyPair(java.util.Collection<? extends java.util.Map.Entry<java.security.KeyPair,java.lang.String>> keys, java.security.PublicKey key)
-
-