public abstract class SshKeyExchangeClient extends Object implements SshKeyExchange<SshClientContext>
Modifier and Type | Field and Description |
---|---|
protected String |
clientId |
protected byte[] |
clientKexInit |
protected byte[] |
exchangeHash
The exchange hash produced during key exchange.
|
protected boolean |
firstPacketFollows |
protected byte[] |
hostKey
The server's host key.
|
protected SshPublicKey |
key |
protected BigInteger |
secret
The secret value produced during key exchange.
|
protected String |
serverId |
protected byte[] |
serverKexInit |
protected byte[] |
signature
The signature generated over the exchange hash
|
protected TransportProtocol<SshClientContext> |
transport
The transport protocol for sending/receiving messages
|
protected boolean |
useFirstPacket |
Constructor and Description |
---|
SshKeyExchangeClient()
Contruct an uninitialized key exchange
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getExchangeHash()
Get the output of the key exchange
|
byte[] |
getHostKey()
Get the host key supplied during key exchange.
|
BigInteger |
getSecret()
Get the secret value produced during key exchange.
|
byte[] |
getSignature()
Get the signature produced during key exchange.
|
boolean |
hasReceivedNewKeys() |
boolean |
hasSentNewKeys() |
boolean |
isComplete() |
abstract boolean |
processMessage(byte[] msg)
Process a key exchange message
|
void |
reset()
Reset the key exchange.
|
void |
setReceivedNewKeys(boolean receivedNewKeys) |
void |
setSentNewKeys(boolean sentNewKeys) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithm, getHashAlgorithm, init, test
protected BigInteger secret
protected byte[] exchangeHash
protected byte[] hostKey
protected byte[] signature
protected String clientId
protected String serverId
protected byte[] clientKexInit
protected byte[] serverKexInit
protected SshPublicKey key
protected boolean firstPacketFollows
protected boolean useFirstPacket
protected TransportProtocol<SshClientContext> transport
public SshKeyExchangeClient()
public void setReceivedNewKeys(boolean receivedNewKeys)
setReceivedNewKeys
in interface SshKeyExchange<SshClientContext>
public void setSentNewKeys(boolean sentNewKeys)
setSentNewKeys
in interface SshKeyExchange<SshClientContext>
public boolean hasSentNewKeys()
hasSentNewKeys
in interface SshKeyExchange<SshClientContext>
public boolean hasReceivedNewKeys()
hasReceivedNewKeys
in interface SshKeyExchange<SshClientContext>
public byte[] getExchangeHash()
getExchangeHash
in interface SshKeyExchange<SshClientContext>
public byte[] getHostKey()
public BigInteger getSecret()
getSecret
in interface SshKeyExchange<SshClientContext>
public byte[] getSignature()
public abstract boolean processMessage(byte[] msg) throws SshException, IOException
processMessage
in interface SshKeyExchange<SshClientContext>
msg
- IOException
SshException
public void reset()
public boolean isComplete()
Copyright © 2016. All rights reserved.