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 TypeMethodDescriptionvoid
acceptService
(Service service) protected SshMsgKexInit
protected String
protected String
protected String
protected String
protected SshMsgKexInit
protected String
protected String
protected SshMsgKexInit
protected void
protected void
protected void
protected void
void
void
protected void
protected void
protected void
setRemoteIdent
(String ident) protected void
protected void
setupNewKeys
(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) protected void
Methods 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:
onDisconnect
in classTransportProtocolCommon
-
acceptService
- Parameters:
service
-- Throws:
IOException
-
refuseConnection
- Throws:
IOException
-
registerTransportMessages
- Specified by:
registerTransportMessages
in classTransportProtocolCommon
- Throws:
MessageAlreadyRegisteredException
-
startBinaryPacketProtocol
- Overrides:
startBinaryPacketProtocol
in classTransportProtocolCommon
- Throws:
IOException
-
getDecryptionAlgorithm
- Specified by:
getDecryptionAlgorithm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
getEncryptionAlgorithm
- Specified by:
getEncryptionAlgorithm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
getInputStreamCompAlgortihm
- Specified by:
getInputStreamCompAlgortihm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
getInputStreamMacAlgorithm
- Specified by:
getInputStreamMacAlgorithm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
setLocalIdent
protected void setLocalIdent()- Specified by:
setLocalIdent
in classTransportProtocolCommon
-
getLocalId
- Specified by:
getLocalId
in classTransportProtocolCommon
- Returns:
-
setLocalKexInit
- Specified by:
setLocalKexInit
in classTransportProtocolCommon
- Parameters:
msg
-
-
getLocalKexInit
- Specified by:
getLocalKexInit
in classTransportProtocolCommon
- Returns:
-
getOutputStreamCompAlgorithm
- Specified by:
getOutputStreamCompAlgorithm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
getOutputStreamMacAlgorithm
- Specified by:
getOutputStreamMacAlgorithm
in classTransportProtocolCommon
- Returns:
- Throws:
AlgorithmNotAgreedException
-
setRemoteIdent
- Specified by:
setRemoteIdent
in classTransportProtocolCommon
- Parameters:
ident
-
-
getRemoteId
- Specified by:
getRemoteId
in classTransportProtocolCommon
- Returns:
-
setRemoteKexInit
- Specified by:
setRemoteKexInit
in classTransportProtocolCommon
- Parameters:
msg
-
-
getRemoteKexInit
- Specified by:
getRemoteKexInit
in classTransportProtocolCommon
- Returns:
-
createLocalKexInit
- Overrides:
createLocalKexInit
in classTransportProtocolCommon
- Returns:
- Throws:
IOException
TransportProtocolException
-
onStartTransportProtocol
- Specified by:
onStartTransportProtocol
in classTransportProtocolCommon
- Throws:
IOException
-
performKeyExchange
- Specified by:
performKeyExchange
in classTransportProtocolCommon
- Parameters:
kex
-- Throws:
IOException
KeyExchangeException
-
onMessageReceived
- Specified by:
onMessageReceived
in 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:
setupNewKeys
in classTransportProtocolCommon
- Parameters:
encryptCSKey
-encryptCSIV
-encryptSCKey
-encryptSCIV
-macCSKey
-macSCKey
-- Throws:
AlgorithmNotAgreedException
AlgorithmOperationException
AlgorithmNotSupportedException
AlgorithmInitializationException
-