|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.j2ssh.agent.SshAgentConnection
This class provides a connection using the SSH agent protocol.
| Method Summary | |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
protected void sendAgentSuccess()
throws java.io.IOException
java.io.IOException - if an IO error occurs
protected void sendAgentFailure(int errorcode)
throws java.io.IOException
errorcode - the error code of the failure
java.io.IOException - if an IO error occurs
protected void sendVersionResponse()
throws java.io.IOException
java.io.IOException - if an IO error occurs
protected void sendAgentKeyList()
throws java.io.IOException
java.io.IOException - if an IO error occurs
protected void sendOperationComplete(byte[] data)
throws java.io.IOException
data - the data generating from the signing operation
java.io.IOException - if an IO error occurs
protected void sendRandomData(byte[] data)
throws java.io.IOException
data - some random data
java.io.IOException - if an IO error occurs
protected void sendAgentAlive(byte[] padding)
throws java.io.IOException
padding - some random padding for the message
java.io.IOException - if an IO error occurs
protected void sendMessage(SubsystemMessage msg)
throws java.io.IOException
msg - the subsystem message to send
java.io.IOException - if an IO error occursprotected void onForwardingNotice(com.sshtools.j2ssh.agent.SshAgentForwardingNotice msg)
msg - the forwarding notice
protected void onRequestVersion(com.sshtools.j2ssh.agent.SshAgentRequestVersion msg)
throws java.io.IOException
msg - the version request message
java.io.IOException - if an IO error occurs
protected void onAddKey(com.sshtools.j2ssh.agent.SshAgentAddKey msg)
throws java.io.IOException
msg - the message containing the key
java.io.IOException - if an IO error occurs
protected void onDeleteAllKeys(com.sshtools.j2ssh.agent.SshAgentDeleteAllKeys msg)
throws java.io.IOException
msg - the delete all keys message
java.io.IOException - if an IO error occurs
protected void onListKeys(com.sshtools.j2ssh.agent.SshAgentListKeys msg)
throws java.io.IOException
msg - the list all keys message
java.io.IOException - if an IO error occurs
protected void onPrivateKeyOp(com.sshtools.j2ssh.agent.SshAgentPrivateKeyOp msg)
throws java.io.IOException
msg - the private key operation message
java.io.IOException - if an IO error occurs
protected void onDeleteKey(com.sshtools.j2ssh.agent.SshAgentDeleteKey msg)
throws java.io.IOException
msg - the message containin the key to delete
java.io.IOException - if an IO error occurs
protected void onLock(com.sshtools.j2ssh.agent.SshAgentLock msg)
throws java.io.IOException
msg - the message containing a password
java.io.IOException - if an IO error occurs
protected void onUnlock(com.sshtools.j2ssh.agent.SshAgentUnlock msg)
throws java.io.IOException
msg - the message containin the password
java.io.IOException - if an IO error occurs
protected void onPing(com.sshtools.j2ssh.agent.SshAgentPing msg)
throws java.io.IOException
msg - the ping message containing some padding
java.io.IOException - if an IO error occurs
protected void onRandom(com.sshtools.j2ssh.agent.SshAgentRandom msg)
throws java.io.IOException
msg - the random message
java.io.IOException - if an IO error occurspublic void run()
run in interface java.lang.Runnable
protected void onMessageReceived(byte[] msgdata)
throws java.io.IOException
msgdata - the raw message received
java.io.IOException - if an IO error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||