com.sshtools.daemon.transport

Class TransportProtocolServer

Implemented Interfaces:
Runnable, TransportProtocol

public class TransportProtocolServer
extends TransportProtocolCommon

Version:
$Revision: 1.12 $
Author:
$author$

Field Summary

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

TransportProtocolServer()
Creates a new TransportProtocolServer object.
TransportProtocolServer(boolean refuse)
Creates a new TransportProtocolServer object.

Method Summary

void
acceptService(Service service)
protected SshMsgKexInit
createLocalKexInit()
protected String
getDecryptionAlgorithm()
protected String
getEncryptionAlgorithm()
protected String
getInputStreamCompAlgortihm()
protected String
getInputStreamMacAlgorithm()
String
getLocalId()
protected SshMsgKexInit
getLocalKexInit()
protected String
getOutputStreamCompAlgorithm()
protected String
getOutputStreamMacAlgorithm()
String
getRemoteId()
protected SshMsgKexInit
getRemoteKexInit()
protected void
onDisconnect()
protected void
onMessageReceived(SshMessage msg)
protected void
onStartTransportProtocol()
protected void
performKeyExchange(SshKeyExchange kex)
void
refuseConnection()
void
registerTransportMessages()
protected void
setLocalIdent()
protected void
setLocalKexInit(SshMsgKexInit msg)
protected void
setRemoteIdent(String ident)
protected void
setRemoteKexInit(SshMsgKexInit msg)
protected void
setupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey)
protected void
startBinaryPacketProtocol()

Methods inherited from class com.sshtools.j2ssh.transport.TransportProtocolCommon

addEventHandler, addMessageStore, beginKeyExchange, completeKeyExchange, createLocalKexInit, determineAlgorithm, disconnect, getConnectionId, getDecryptionAlgorithm, getEncryptionAlgorithm, getEventHandlers, getIncomingByteCount, getInputStreamCompAlgortihm, getInputStreamMacAlgorithm, getKexAlgorithm, getLocalId, getLocalKexInit, getOutgoingByteCount, getOutputStreamCompAlgorithm, getOutputStreamMacAlgorithm, getProperties, getRemoteEOL, getRemoteId, getRemoteKexInit, getSessionIdentifier, getState, getUnderlyingProviderDetail, isConnected, onCorruptMac, onDisconnect, onMessageReceived, onStartTransportProtocol, performKeyExchange, processMessages, readMessage, registerTransportMessages, removeMessageStore, run, sendDisconnect, sendDisconnect, sendKeyExchangeInit, sendMessage, sendNewKeys, setKexTimeout, setKexTransferLimit, setLocalIdent, setLocalKexInit, setRemoteIdent, setRemoteKexInit, setSendIgnore, setupNewKeys, startBinaryPacketProtocol, startTransportProtocol, stop, unregisterMessage

Constructor Details

TransportProtocolServer

public TransportProtocolServer()
            throws IOException
Creates a new TransportProtocolServer object.

TransportProtocolServer

public TransportProtocolServer(boolean refuse)
            throws IOException
Creates a new TransportProtocolServer object.
Parameters:
refuse -

Method Details

acceptService

public void acceptService(Service service)
            throws IOException
Parameters:
service -

createLocalKexInit

protected SshMsgKexInit createLocalKexInit()
            throws IOException
Overrides:
createLocalKexInit in interface TransportProtocolCommon
Returns:

getDecryptionAlgorithm

protected String getDecryptionAlgorithm()
            throws AlgorithmNotAgreedException
Overrides:
getDecryptionAlgorithm in interface TransportProtocolCommon
Returns:

getEncryptionAlgorithm

protected String getEncryptionAlgorithm()
            throws AlgorithmNotAgreedException
Overrides:
getEncryptionAlgorithm in interface TransportProtocolCommon
Returns:

getInputStreamCompAlgortihm

protected String getInputStreamCompAlgortihm()
            throws AlgorithmNotAgreedException
Overrides:
getInputStreamCompAlgortihm in interface TransportProtocolCommon
Returns:

getInputStreamMacAlgorithm

protected String getInputStreamMacAlgorithm()
            throws AlgorithmNotAgreedException
Overrides:
getInputStreamMacAlgorithm in interface TransportProtocolCommon
Returns:

getLocalId

public String getLocalId()
Overrides:
getLocalId in interface TransportProtocolCommon
Returns:

getLocalKexInit

protected SshMsgKexInit getLocalKexInit()
Overrides:
getLocalKexInit in interface TransportProtocolCommon
Returns:

getOutputStreamCompAlgorithm

protected String getOutputStreamCompAlgorithm()
            throws AlgorithmNotAgreedException
Overrides:
getOutputStreamCompAlgorithm in interface TransportProtocolCommon
Returns:

getOutputStreamMacAlgorithm

protected String getOutputStreamMacAlgorithm()
            throws AlgorithmNotAgreedException
Overrides:
getOutputStreamMacAlgorithm in interface TransportProtocolCommon
Returns:

getRemoteId

public String getRemoteId()
Overrides:
getRemoteId in interface TransportProtocolCommon
Returns:

getRemoteKexInit

protected SshMsgKexInit getRemoteKexInit()
Overrides:
getRemoteKexInit in interface TransportProtocolCommon
Returns:

onDisconnect

protected void onDisconnect()
Overrides:
onDisconnect in interface TransportProtocolCommon

onMessageReceived

protected void onMessageReceived(SshMessage msg)
            throws IOException
Overrides:
onMessageReceived in interface TransportProtocolCommon
Parameters:
msg -

onStartTransportProtocol

protected void onStartTransportProtocol()
            throws IOException
Overrides:
onStartTransportProtocol in interface TransportProtocolCommon

performKeyExchange

protected void performKeyExchange(SshKeyExchange kex)
            throws IOException
Overrides:
performKeyExchange in interface TransportProtocolCommon
Parameters:
kex -

refuseConnection

public void refuseConnection()
            throws IOException

registerTransportMessages

public void registerTransportMessages()
            throws MessageAlreadyRegisteredException
Overrides:
registerTransportMessages in interface TransportProtocolCommon

setLocalIdent

protected void setLocalIdent()
Overrides:
setLocalIdent in interface TransportProtocolCommon

setLocalKexInit

protected void setLocalKexInit(SshMsgKexInit msg)
Overrides:
setLocalKexInit in interface TransportProtocolCommon
Parameters:
msg -

setRemoteIdent

protected void setRemoteIdent(String ident)
Overrides:
setRemoteIdent in interface TransportProtocolCommon
Parameters:
ident -

setRemoteKexInit

protected void setRemoteKexInit(SshMsgKexInit msg)
Overrides:
setRemoteKexInit in interface TransportProtocolCommon
Parameters:
msg -

setupNewKeys

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 -

startBinaryPacketProtocol

protected void startBinaryPacketProtocol()
            throws IOException
Overrides:
startBinaryPacketProtocol in interface TransportProtocolCommon

Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.