Package com.sshtools.daemon.transport
Class TransportProtocolServer
java.lang.Object
com.sshtools.j2ssh.transport.TransportProtocolCommon
com.sshtools.daemon.transport.TransportProtocolServer
- All Implemented Interfaces:
TransportProtocol,Runnable
- Version:
- $Revision: 1.12 $
- Author:
- $author$
-
Field Summary
Fields inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon
algorithmsIn, algorithmsOut, clientIdent, clientKexInit, completeOnNewKeys, EOL_CRLF, EOL_LF, hostKey, hosts, k, kexs, messageStore, properties, PROTOCOL_VERSION, serverIdent, serverKexInit, sessionIdentifier, signature, SOFTWARE_VERSION_COMMENTS, sshIn, sshOut, state -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TransportProtocolServer object.TransportProtocolServer(boolean refuse) Creates a new TransportProtocolServer object. -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptService(Service service) protected SshMsgKexInitprotected Stringprotected Stringprotected Stringprotected Stringprotected SshMsgKexInitprotected Stringprotected Stringprotected SshMsgKexInitprotected voidprotected voidprotected voidprotected voidvoidvoidprotected voidprotected voidprotected voidsetRemoteIdent(String ident) protected voidprotected voidsetupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) protected voidMethods inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon
addEventHandler, addMessageStore, beginKeyExchange, completeKeyExchange, 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, startTransportProtocol, stop, unregisterMessage
-
Constructor Details
-
TransportProtocolServer
Creates a new TransportProtocolServer object.- Throws:
IOException
-
TransportProtocolServer
Creates a new TransportProtocolServer object.- Parameters:
refuse-- Throws:
IOException
-
-
Method Details
-
onDisconnect
protected void onDisconnect()- Specified by:
onDisconnectin classTransportProtocolCommon
-
acceptService
- Parameters:
service-- Throws:
IOException
-
refuseConnection
- Throws:
IOException
-
registerTransportMessages
- Specified by:
registerTransportMessagesin classTransportProtocolCommon- Throws:
MessageAlreadyRegisteredException
-
startBinaryPacketProtocol
- Overrides:
startBinaryPacketProtocolin classTransportProtocolCommon- Throws:
IOException
-
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:
-
createLocalKexInit
- Overrides:
createLocalKexInitin classTransportProtocolCommon- Returns:
- Throws:
IOExceptionTransportProtocolException
-
onStartTransportProtocol
- Specified by:
onStartTransportProtocolin classTransportProtocolCommon- Throws:
IOException
-
performKeyExchange
- Specified by:
performKeyExchangein classTransportProtocolCommon- Parameters:
kex-- Throws:
IOExceptionKeyExchangeException
-
onMessageReceived
- Specified by:
onMessageReceivedin classTransportProtocolCommon- Parameters:
msg-- 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
-