SSH_AUTHSOCKET_ENV_NAME| Constructor and Description |
|---|
AgentDelegate(SshAgent agent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIdentity(KeyPair key,
String comment) |
void |
close() |
Iterable<? extends Map.Entry<PublicKey,String>> |
getIdentities() |
boolean |
isOpen() |
void |
removeAllIdentities() |
void |
removeIdentity(PublicKey key) |
Map.Entry<String,byte[]> |
sign(SessionContext session,
PublicKey key,
String algo,
byte[] data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveLocalIdentitypublic AgentDelegate(SshAgent agent)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic Iterable<? extends Map.Entry<PublicKey,String>> getIdentities() throws IOException
getIdentities in interface SshAgentIOExceptionpublic Map.Entry<String,byte[]> sign(SessionContext session, PublicKey key, String algo, byte[] data) throws IOException
sign in interface SshAgentsession - The current SessionContextkey - 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 signIOException - If failed to signpublic void addIdentity(KeyPair key, String comment) throws IOException
addIdentity in interface SshAgentIOExceptionpublic void removeIdentity(PublicKey key) throws IOException
removeIdentity in interface SshAgentIOExceptionpublic void removeAllIdentities()
throws IOException
removeAllIdentities in interface SshAgentIOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.