public class SshAgentConnection
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Method and Description |
|---|---|
protected void |
onAddKey(com.sshtools.j2ssh.agent.SshAgentAddKey msg)
Called when the remote side adds a key the agent.
|
protected void |
onDeleteAllKeys(com.sshtools.j2ssh.agent.SshAgentDeleteAllKeys msg)
Called when the remote side requests that all keys be removed from the
agent.
|
protected void |
onDeleteKey(com.sshtools.j2ssh.agent.SshAgentDeleteKey msg)
Called by the remote side to delete a key from the agent
|
protected void |
onForwardingNotice(com.sshtools.j2ssh.agent.SshAgentForwardingNotice msg)
Called when a forwarding notice is recceived from the remote side.
|
protected void |
onListKeys(com.sshtools.j2ssh.agent.SshAgentListKeys msg)
Called by the remote side when a list of the agents keys is required
|
protected void |
onLock(com.sshtools.j2ssh.agent.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(com.sshtools.j2ssh.agent.SshAgentPing msg)
Called when a ping message is received
|
protected void |
onPrivateKeyOp(com.sshtools.j2ssh.agent.SshAgentPrivateKeyOp msg)
Called by the remote side to initiate a private key operation.
|
protected void |
onRandom(com.sshtools.j2ssh.agent.SshAgentRandom msg)
Called when the remote side sends a random message
|
protected void |
onRequestVersion(com.sshtools.j2ssh.agent.SshAgentRequestVersion msg)
Called when the remote side requests the version number of this
protocol.
|
protected void |
onUnlock(com.sshtools.j2ssh.agent.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(SubsystemMessage 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
|
protected void sendAgentSuccess()
throws java.io.IOException
java.io.IOException - if an IO error occursprotected void sendAgentFailure(int errorcode)
throws java.io.IOException
errorcode - the error code of the failurejava.io.IOException - if an IO error occursprotected void sendVersionResponse()
throws java.io.IOException
java.io.IOException - if an IO error occursprotected void sendAgentKeyList()
throws java.io.IOException
java.io.IOException - if an IO error occursprotected void sendOperationComplete(byte[] data)
throws java.io.IOException
data - the data generating from the signing operationjava.io.IOException - if an IO error occursprotected void sendRandomData(byte[] data)
throws java.io.IOException
data - some random datajava.io.IOException - if an IO error occursprotected void sendAgentAlive(byte[] padding)
throws java.io.IOException
padding - some random padding for the messagejava.io.IOException - if an IO error occursprotected void sendMessage(SubsystemMessage msg) throws java.io.IOException
msg - the subsystem message to sendjava.io.IOException - if an IO error occursprotected void onForwardingNotice(com.sshtools.j2ssh.agent.SshAgentForwardingNotice msg)
msg - the forwarding noticeprotected void onRequestVersion(com.sshtools.j2ssh.agent.SshAgentRequestVersion msg)
throws java.io.IOException
msg - the version request messagejava.io.IOException - if an IO error occursprotected void onAddKey(com.sshtools.j2ssh.agent.SshAgentAddKey msg)
throws java.io.IOException
msg - the message containing the keyjava.io.IOException - if an IO error occursprotected void onDeleteAllKeys(com.sshtools.j2ssh.agent.SshAgentDeleteAllKeys msg)
throws java.io.IOException
msg - the delete all keys messagejava.io.IOException - if an IO error occursprotected void onListKeys(com.sshtools.j2ssh.agent.SshAgentListKeys msg)
throws java.io.IOException
msg - the list all keys messagejava.io.IOException - if an IO error occursprotected void onPrivateKeyOp(com.sshtools.j2ssh.agent.SshAgentPrivateKeyOp msg)
throws java.io.IOException
msg - the private key operation messagejava.io.IOException - if an IO error occursprotected void onDeleteKey(com.sshtools.j2ssh.agent.SshAgentDeleteKey msg)
throws java.io.IOException
msg - the message containin the key to deletejava.io.IOException - if an IO error occursprotected void onLock(com.sshtools.j2ssh.agent.SshAgentLock msg)
throws java.io.IOException
msg - the message containing a passwordjava.io.IOException - if an IO error occursprotected void onUnlock(com.sshtools.j2ssh.agent.SshAgentUnlock msg)
throws java.io.IOException
msg - the message containin the passwordjava.io.IOException - if an IO error occursprotected void onPing(com.sshtools.j2ssh.agent.SshAgentPing msg)
throws java.io.IOException
msg - the ping message containing some paddingjava.io.IOException - if an IO error occursprotected void onRandom(com.sshtools.j2ssh.agent.SshAgentRandom msg)
throws java.io.IOException
msg - the random messagejava.io.IOException - if an IO error occurspublic void run()
run in interface java.lang.Runnableprotected void onMessageReceived(byte[] msgdata)
throws java.io.IOException
msgdata - the raw message receivedjava.io.IOException - if an IO error occursCopyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.