Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.sshtools.j2ssh.transport.TransportProtocolCommon
com.sshtools.j2ssh.transport.TransportProtocolClient
public class TransportProtocolClient
extends TransportProtocolCommon
Field Summary | |
protected SshPublicKey |
Fields inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon | |
EOL_CRLF , EOL_LF , PROTOCOL_VERSION , SOFTWARE_VERSION_COMMENTS , algorithmsIn , algorithmsOut , clientIdent , clientKexInit , completeOnNewKeys , hostKey , hosts , k , kexs , log , messageStore , properties , serverIdent , serverKexInit , sessionIdentifier , signature , sshIn , sshOut , state |
Constructor Summary | |
|
Method Summary | |
protected String | |
protected String | |
protected String | |
protected String | |
String | |
protected SshMsgKexInit | |
protected String | |
protected String | |
String | |
protected SshMsgKexInit | |
SshPublicKey | |
protected void | |
void | |
protected void | |
protected void | |
void | |
void |
|
protected void | |
protected void | |
protected void |
|
protected void | |
protected void |
|
protected boolean |
|
public TransportProtocolClient(HostKeyVerification hosts) throws TransportProtocolException
Creates a new TransportProtocolClient object.
- Parameters:
hosts
-
- Throws:
TransportProtocolException
-
protected String getDecryptionAlgorithm() throws AlgorithmNotAgreedException
- Overrides:
- getDecryptionAlgorithm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
protected String getEncryptionAlgorithm() throws AlgorithmNotAgreedException
- Overrides:
- getEncryptionAlgorithm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
protected String getInputStreamCompAlgortihm() throws AlgorithmNotAgreedException
- Overrides:
- getInputStreamCompAlgortihm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
protected String getInputStreamMacAlgorithm() throws AlgorithmNotAgreedException
- Overrides:
- getInputStreamMacAlgorithm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
public String getLocalId()
- Overrides:
- getLocalId in interface TransportProtocolCommon
- Returns:
protected SshMsgKexInit getLocalKexInit()
- Overrides:
- getLocalKexInit in interface TransportProtocolCommon
- Returns:
protected String getOutputStreamCompAlgorithm() throws AlgorithmNotAgreedException
- Overrides:
- getOutputStreamCompAlgorithm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
protected String getOutputStreamMacAlgorithm() throws AlgorithmNotAgreedException
- Overrides:
- getOutputStreamMacAlgorithm in interface TransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
public String getRemoteId()
- Overrides:
- getRemoteId in interface TransportProtocolCommon
- Returns:
protected SshMsgKexInit getRemoteKexInit()
- Overrides:
- getRemoteKexInit in interface TransportProtocolCommon
- Returns:
protected void onDisconnect()
- Overrides:
- onDisconnect in interface TransportProtocolCommon
public void onMessageReceived(SshMessage msg) throws IOException
- Overrides:
- onMessageReceived in interface TransportProtocolCommon
- Parameters:
msg
-
protected void onStartTransportProtocol() throws IOException
- Overrides:
- onStartTransportProtocol in interface TransportProtocolCommon
protected void performKeyExchange(SshKeyExchange kex) throws IOException
- Overrides:
- performKeyExchange in interface TransportProtocolCommon
- Parameters:
kex
-
public void registerTransportMessages() throws MessageAlreadyRegisteredException
- Overrides:
- registerTransportMessages in interface TransportProtocolCommon
- Throws:
MessageAlreadyRegisteredException
-
protected void setLocalIdent()
- Overrides:
- setLocalIdent in interface TransportProtocolCommon
protected void setLocalKexInit(SshMsgKexInit msg)
- Overrides:
- setLocalKexInit in interface TransportProtocolCommon
- Parameters:
msg
-
protected void setRemoteIdent(String ident)
- Overrides:
- setRemoteIdent in interface TransportProtocolCommon
- Parameters:
ident
-
protected void setRemoteKexInit(SshMsgKexInit msg)
- Overrides:
- setRemoteKexInit in interface TransportProtocolCommon
- Parameters:
msg
-
protected void setupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) throws AlgorithmNotAgreedException, AlgorithmOperationException, AlgorithmNotSupportedException, AlgorithmInitializationException
- Overrides:
- setupNewKeys in interface TransportProtocolCommon
- Parameters:
encryptCSKey
-encryptCSIV
-encryptSCKey
-encryptSCIV
-macCSKey
-macSCKey
-
protected boolean verifyHostKey(byte[] key, byte[] sig, byte[] sigdata) throws TransportProtocolException
- Parameters:
key
-sig
-sigdata
-
- Returns:
- Throws:
TransportProtocolException
-