Modifier and Type | Field and Description |
---|---|
private java.util.List<java.util.Map.Entry<java.security.KeyPair,java.lang.String>> |
keys |
private java.util.concurrent.atomic.AtomicBoolean |
open |
SSH_AUTHSOCKET_ENV_NAME
Constructor and Description |
---|
AgentImpl() |
Modifier and Type | Method and 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(java.security.PublicKey key,
byte[] data) |
private final java.util.List<java.util.Map.Entry<java.security.KeyPair,java.lang.String>> keys
private final java.util.concurrent.atomic.AtomicBoolean open
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,java.lang.String>> getIdentities() throws java.io.IOException
getIdentities
in interface SshAgent
java.io.IOException
public byte[] sign(java.security.PublicKey key, byte[] data) throws java.io.IOException
public void addIdentity(java.security.KeyPair key, java.lang.String comment) throws java.io.IOException
addIdentity
in interface SshAgent
java.io.IOException
public void removeIdentity(java.security.PublicKey key) throws java.io.IOException
removeIdentity
in interface SshAgent
java.io.IOException
public void removeAllIdentities() throws java.io.IOException
removeAllIdentities
in interface SshAgent
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
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)