public class RFCAgentConnection extends Object implements Runnable, SshAgentConnection
Constructor and Description |
---|
RFCAgentConnection(KeyStore keystore,
InputStream in,
OutputStream out,
Closeable closeable) |
Modifier and Type | Method and Description |
---|---|
protected void |
onAddKey(SshAgentAddKey msg)
Called when the remote side adds a key the agent.
|
protected void |
onDeleteAllKeys(AgentMessage msg)
Called when the remote side requests that all keys be removed from the
agent.
|
protected void |
onDeleteKey(SshAgentDeleteKey msg)
Called by the remote side to delete a key from the agent
|
protected void |
onForwardingNotice(SshAgentForwardingNotice msg)
Called when a forwarding notice is recceived from the remote side.
|
protected void |
onListKeys(AgentMessage msg)
Called by the remote side when a list of the agents keys is required
|
protected void |
onLock(SshAgentLock msg)
Called by the remote side when the agent is to be locked
|
protected void |
onMessageReceived(byte[] msgdata)
Process a message and route to the handler method
|
protected void |
onPing(SshAgentPing msg)
Called when a ping message is received
|
protected void |
onPrivateKeyOp(SshAgentPrivateKeyOp msg)
Called by the remote side to initiate a private key operation.
|
protected void |
onRandom(SshAgentRandom msg)
Called when the remote side sends a random message
|
protected void |
onRequestVersion(SshAgentRequestVersion msg)
Called when the remote side requests the version number of this
protocol.
|
protected void |
onUnlock(SshAgentUnlock msg)
Called by the remote side when the agent is to be unlocked
|
void |
run()
The connection thread
|
protected void |
sendAgentAlive(byte[] padding)
Send the agent alive message.
|
protected void |
sendAgentFailure(int errorcode)
Send a failure message
|
protected void |
sendAgentKeyList()
Send the agents key list to the remote side.
|
protected void |
sendAgentSuccess()
Send a success message.
|
protected void |
sendMessage(AgentMessage msg)
Sends a subsystem message.
|
protected void |
sendOperationComplete(byte[] data)
Send the completed signing operation data.
|
protected void |
sendRandomData(byte[] data)
Send some random data to the remote side.
|
protected void |
sendVersionResponse()
Send the version response; this class currently implements version 2
|
public RFCAgentConnection(KeyStore keystore, InputStream in, OutputStream out, Closeable closeable)
protected void sendAgentSuccess() throws IOException
IOException
- if an IO error occursprotected void sendAgentFailure(int errorcode) throws IOException
errorcode
- the error code of the failureIOException
- if an IO error occursprotected void sendVersionResponse() throws IOException
IOException
- if an IO error occursprotected void sendAgentKeyList() throws IOException
IOException
- if an IO error occursprotected void sendOperationComplete(byte[] data) throws IOException
data
- the data generating from the signing operationIOException
- if an IO error occursprotected void sendRandomData(byte[] data) throws IOException
data
- some random dataIOException
- if an IO error occursprotected void sendAgentAlive(byte[] padding) throws IOException
padding
- some random padding for the messageIOException
- if an IO error occursprotected void sendMessage(AgentMessage msg) throws IOException
msg
- the subsystem message to sendIOException
- if an IO error occursprotected void onForwardingNotice(SshAgentForwardingNotice msg)
msg
- the forwarding noticeprotected void onRequestVersion(SshAgentRequestVersion msg) throws IOException
msg
- the version request messageIOException
- if an IO error occursprotected void onAddKey(SshAgentAddKey msg) throws IOException
msg
- the message containing the keyIOException
- if an IO error occursprotected void onDeleteAllKeys(AgentMessage msg) throws IOException
msg
- the delete all keys messageIOException
- if an IO error occursprotected void onListKeys(AgentMessage msg) throws IOException
msg
- the list all keys messageIOException
- if an IO error occursprotected void onPrivateKeyOp(SshAgentPrivateKeyOp msg) throws IOException
msg
- the private key operation messageIOException
- if an IO error occursprotected void onDeleteKey(SshAgentDeleteKey msg) throws IOException
msg
- the message containin the key to deleteIOException
- if an IO error occursprotected void onLock(SshAgentLock msg) throws IOException
msg
- the message containing a passwordIOException
- if an IO error occursprotected void onUnlock(SshAgentUnlock msg) throws IOException
msg
- the message containin the passwordIOException
- if an IO error occursprotected void onPing(SshAgentPing msg) throws IOException
msg
- the ping message containing some paddingIOException
- if an IO error occursprotected void onRandom(SshAgentRandom msg) throws IOException
msg
- the random messageIOException
- if an IO error occursprotected void onMessageReceived(byte[] msgdata) throws IOException
msgdata
- the raw message receivedIOException
- if an IO error occursCopyright © 2024. All rights reserved.