Package com.sshtools.j2ssh.transport
Class TransportProtocolClient
java.lang.Object
com.sshtools.j2ssh.transport.TransportProtocolCommon
com.sshtools.j2ssh.transport.TransportProtocolClient
- All Implemented Interfaces:
TransportProtocol,Runnable
- Version:
- $Revision: 1.49 $
- Author:
- $author$
-
Field Summary
FieldsFields inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon
algorithmsIn, algorithmsOut, clientIdent, clientKexInit, completeOnNewKeys, EOL_CRLF, EOL_LF, hostKey, k, kexs, log, messageStore, properties, PROTOCOL_VERSION, serverIdent, serverKexInit, sessionIdentifier, signature, SOFTWARE_VERSION_COMMENTS, sshIn, sshOut, state -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TransportProtocolClient object. -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringprotected Stringprotected Stringprotected SshMsgKexInitprotected Stringprotected Stringprotected SshMsgKexInitprotected voidvoidprotected voidprotected voidvoidvoidrequestService(Service service) protected voidprotected voidprotected voidsetRemoteIdent(String ident) protected voidprotected voidsetupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) protected booleanverifyHostKey(byte[] key, byte[] sig, byte[] sigdata) Methods inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon
addEventHandler, addMessageStore, beginKeyExchange, completeKeyExchange, createLocalKexInit, determineAlgorithm, disconnect, getConnectionId, getEventHandlers, getIncomingByteCount, getKexAlgorithm, getOutgoingByteCount, getProperties, getRemoteEOL, getSessionIdentifier, getState, getUnderlyingProviderDetail, isConnected, onCorruptMac, processMessages, readMessage, removeMessageStore, run, sendDisconnect, sendDisconnect, sendKeyExchangeInit, sendMessage, sendNewKeys, setKexTimeout, setKexTransferLimit, setSendIgnore, startBinaryPacketProtocol, startTransportProtocol, stop, unregisterMessage
-
Field Details
-
pk
-
-
Constructor Details
-
TransportProtocolClient
Creates a new TransportProtocolClient object.- Parameters:
hosts-- Throws:
TransportProtocolException
-
-
Method Details
-
onMessageReceived
- Specified by:
onMessageReceivedin classTransportProtocolCommon- Parameters:
msg-- Throws:
IOException
-
registerTransportMessages
- Specified by:
registerTransportMessagesin classTransportProtocolCommon- Throws:
MessageAlreadyRegisteredException
-
requestService
- Parameters:
service-- Throws:
IOExceptionSshException
-
onDisconnect
protected void onDisconnect()- Specified by:
onDisconnectin classTransportProtocolCommon
-
getDecryptionAlgorithm
- Specified by:
getDecryptionAlgorithmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
getEncryptionAlgorithm
- Specified by:
getEncryptionAlgorithmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
getInputStreamCompAlgortihm
- Specified by:
getInputStreamCompAlgortihmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
getInputStreamMacAlgorithm
- Specified by:
getInputStreamMacAlgorithmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
setLocalIdent
protected void setLocalIdent()- Specified by:
setLocalIdentin classTransportProtocolCommon
-
getLocalId
- Specified by:
getLocalIdin classTransportProtocolCommon- Returns:
-
setLocalKexInit
- Specified by:
setLocalKexInitin classTransportProtocolCommon- Parameters:
msg-
-
getLocalKexInit
- Specified by:
getLocalKexInitin classTransportProtocolCommon- Returns:
-
getOutputStreamCompAlgorithm
- Specified by:
getOutputStreamCompAlgorithmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
getOutputStreamMacAlgorithm
- Specified by:
getOutputStreamMacAlgorithmin classTransportProtocolCommon- Returns:
- Throws:
AlgorithmNotAgreedException
-
setRemoteIdent
- Specified by:
setRemoteIdentin classTransportProtocolCommon- Parameters:
ident-
-
getRemoteId
- Specified by:
getRemoteIdin classTransportProtocolCommon- Returns:
-
setRemoteKexInit
- Specified by:
setRemoteKexInitin classTransportProtocolCommon- Parameters:
msg-
-
getRemoteKexInit
- Specified by:
getRemoteKexInitin classTransportProtocolCommon- Returns:
-
getServerHostKey
- Returns:
-
onStartTransportProtocol
- Specified by:
onStartTransportProtocolin classTransportProtocolCommon- Throws:
IOExceptionTransportProtocolException
-
performKeyExchange
- Specified by:
performKeyExchangein classTransportProtocolCommon- Parameters:
kex-- Throws:
IOException
-
setupNewKeys
protected void setupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) throws AlgorithmNotAgreedException, AlgorithmOperationException, AlgorithmNotSupportedException, AlgorithmInitializationException - Specified by:
setupNewKeysin classTransportProtocolCommon- Parameters:
encryptCSKey-encryptCSIV-encryptSCKey-encryptSCIV-macCSKey-macSCKey-- Throws:
AlgorithmNotAgreedExceptionAlgorithmOperationExceptionAlgorithmNotSupportedExceptionAlgorithmInitializationException
-
verifyHostKey
protected boolean verifyHostKey(byte[] key, byte[] sig, byte[] sigdata) throws TransportProtocolException - Parameters:
key-sig-sigdata-- Returns:
- Throws:
TransportProtocolException
-