public interface SshAgent
extends java.nio.channels.Channel
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SSH_AUTHSOCKET_ENV_NAME |
Modifier and Type | Method and Description |
---|---|
void |
addIdentity(java.security.KeyPair key,
java.lang.String comment) |
java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,java.lang.String>> |
getIdentities() |
void |
removeAllIdentities() |
void |
removeIdentity(java.security.PublicKey key) |
java.util.Map.Entry<java.lang.String,byte[]> |
sign(SessionContext session,
java.security.PublicKey key,
java.lang.String algo,
byte[] data) |
static final java.lang.String SSH_AUTHSOCKET_ENV_NAME
java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,java.lang.String>> getIdentities() throws java.io.IOException
java.io.IOException
java.util.Map.Entry<java.lang.String,byte[]> sign(SessionContext session, java.security.PublicKey key, java.lang.String algo, byte[] data) throws java.io.IOException
session
- The current SessionContext
key
- The PublicKey
to use for signingalgo
- Recommended signature algorithm - if null
/empty then one will be selected based on
the key type and/or signature factories. Note: even if specific algorithm specified,
the implementation may disregard and choose anotherdata
- Data to signjava.io.IOException
- If failed to signvoid addIdentity(java.security.KeyPair key, java.lang.String comment) throws java.io.IOException
java.io.IOException
void removeIdentity(java.security.PublicKey key) throws java.io.IOException
java.io.IOException
void removeAllIdentities() throws java.io.IOException
java.io.IOException