public class TransportProtocolClient extends TransportProtocolCommon
Modifier and Type | Field and Description |
---|---|
protected SshPublicKey |
pk |
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 and Description |
---|
TransportProtocolClient(HostKeyVerification hosts)
Creates a new TransportProtocolClient object.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getDecryptionAlgorithm() |
protected java.lang.String |
getEncryptionAlgorithm() |
protected java.lang.String |
getInputStreamCompAlgortihm() |
protected java.lang.String |
getInputStreamMacAlgorithm() |
java.lang.String |
getLocalId() |
protected SshMsgKexInit |
getLocalKexInit() |
protected java.lang.String |
getOutputStreamCompAlgorithm() |
protected java.lang.String |
getOutputStreamMacAlgorithm() |
java.lang.String |
getRemoteId() |
protected SshMsgKexInit |
getRemoteKexInit() |
SshPublicKey |
getServerHostKey() |
protected void |
onDisconnect() |
void |
onMessageReceived(SshMessage msg) |
protected void |
onStartTransportProtocol() |
protected void |
performKeyExchange(SshKeyExchange kex) |
void |
registerTransportMessages() |
void |
requestService(Service service) |
protected void |
setLocalIdent() |
protected void |
setLocalKexInit(SshMsgKexInit msg) |
protected void |
setRemoteIdent(java.lang.String ident) |
protected void |
setRemoteKexInit(SshMsgKexInit msg) |
protected void |
setupNewKeys(byte[] encryptCSKey,
byte[] encryptCSIV,
byte[] encryptSCKey,
byte[] encryptSCIV,
byte[] macCSKey,
byte[] macSCKey) |
protected boolean |
verifyHostKey(byte[] key,
byte[] sig,
byte[] sigdata) |
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
protected SshPublicKey pk
public TransportProtocolClient(HostKeyVerification hosts) throws TransportProtocolException
hosts
- TransportProtocolException
public void onMessageReceived(SshMessage msg) throws java.io.IOException
onMessageReceived
in class TransportProtocolCommon
msg
- java.io.IOException
public void registerTransportMessages() throws MessageAlreadyRegisteredException
registerTransportMessages
in class TransportProtocolCommon
MessageAlreadyRegisteredException
public void requestService(Service service) throws java.io.IOException
service
- java.io.IOException
SshException
protected void onDisconnect()
onDisconnect
in class TransportProtocolCommon
protected java.lang.String getDecryptionAlgorithm() throws AlgorithmNotAgreedException
getDecryptionAlgorithm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected java.lang.String getEncryptionAlgorithm() throws AlgorithmNotAgreedException
getEncryptionAlgorithm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected java.lang.String getInputStreamCompAlgortihm() throws AlgorithmNotAgreedException
getInputStreamCompAlgortihm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected java.lang.String getInputStreamMacAlgorithm() throws AlgorithmNotAgreedException
getInputStreamMacAlgorithm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected void setLocalIdent()
setLocalIdent
in class TransportProtocolCommon
public java.lang.String getLocalId()
getLocalId
in class TransportProtocolCommon
protected void setLocalKexInit(SshMsgKexInit msg)
setLocalKexInit
in class TransportProtocolCommon
msg
- protected SshMsgKexInit getLocalKexInit()
getLocalKexInit
in class TransportProtocolCommon
protected java.lang.String getOutputStreamCompAlgorithm() throws AlgorithmNotAgreedException
getOutputStreamCompAlgorithm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected java.lang.String getOutputStreamMacAlgorithm() throws AlgorithmNotAgreedException
getOutputStreamMacAlgorithm
in class TransportProtocolCommon
AlgorithmNotAgreedException
protected void setRemoteIdent(java.lang.String ident)
setRemoteIdent
in class TransportProtocolCommon
ident
- public java.lang.String getRemoteId()
getRemoteId
in class TransportProtocolCommon
protected void setRemoteKexInit(SshMsgKexInit msg)
setRemoteKexInit
in class TransportProtocolCommon
msg
- protected SshMsgKexInit getRemoteKexInit()
getRemoteKexInit
in class TransportProtocolCommon
public SshPublicKey getServerHostKey()
protected void onStartTransportProtocol() throws java.io.IOException
onStartTransportProtocol
in class TransportProtocolCommon
java.io.IOException
TransportProtocolException
protected void performKeyExchange(SshKeyExchange kex) throws java.io.IOException
performKeyExchange
in class TransportProtocolCommon
kex
- java.io.IOException
KeyExchangeException
protected void setupNewKeys(byte[] encryptCSKey, byte[] encryptCSIV, byte[] encryptSCKey, byte[] encryptSCIV, byte[] macCSKey, byte[] macSCKey) throws AlgorithmNotAgreedException, AlgorithmOperationException, AlgorithmNotSupportedException, AlgorithmInitializationException
setupNewKeys
in class TransportProtocolCommon
encryptCSKey
- encryptCSIV
- encryptSCKey
- encryptSCIV
- macCSKey
- macSCKey
- AlgorithmNotAgreedException
AlgorithmOperationException
AlgorithmNotSupportedException
AlgorithmInitializationException
protected boolean verifyHostKey(byte[] key, byte[] sig, byte[] sigdata) throws TransportProtocolException
key
- sig
- sigdata
- TransportProtocolException
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.