public abstract class SshKeyExchangeServer extends Object implements com.maverick.ssh.components.SshComponent
Abstract representation of an SSH key exchange.
| 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 com.maverick.ssh.components.SshPrivateKey |
prvkey |
protected com.maverick.ssh.components.SshPublicKey |
pubkey |
protected BigInteger |
secret
The secret value produced during key exchange.
|
protected String |
serverId |
protected byte[] |
serverKexInit |
protected org.apache.mina.core.session.IoSession |
session
The transport protocol for sending/receiving messages
|
protected byte[] |
signature
The signature generated over the exchange hash
|
protected SshTransport |
transport |
protected boolean |
useFirstPacket |
| Constructor and Description |
|---|
SshKeyExchangeServer()
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.
|
abstract String |
getName()
Get the key exchange algorithm name.
|
BigInteger |
getSecret()
Get the secret value produced during key exchange.
|
byte[] |
getSignature()
Get the signature produced during key exchange.
|
boolean |
hasReceivedNewKeys() |
boolean |
hasSentNewKeys() |
abstract void |
init(org.apache.mina.core.session.IoSession session,
SshTransport transport,
String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
com.maverick.ssh.components.SshPrivateKey prvkey,
com.maverick.ssh.components.SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
Initialize the server side key exchange.
|
abstract boolean |
processMessage(byte[] msg)
Process a key exchange message
|
void |
reset()
Reset the key exchange.
|
void |
setReceivedNewKeys(boolean receivedNewKeys) |
void |
setSentNewKeys(boolean sentNewKeys) |
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 com.maverick.ssh.components.SshPrivateKey prvkey
protected com.maverick.ssh.components.SshPublicKey pubkey
protected boolean firstPacketFollows
protected boolean useFirstPacket
protected org.apache.mina.core.session.IoSession session
protected SshTransport transport
public SshKeyExchangeServer()
public void setReceivedNewKeys(boolean receivedNewKeys)
public void setSentNewKeys(boolean sentNewKeys)
public boolean hasSentNewKeys()
public boolean hasReceivedNewKeys()
public abstract String getName()
getName in interface com.maverick.ssh.components.SshComponentpublic byte[] getExchangeHash()
public byte[] getHostKey()
public BigInteger getSecret()
public byte[] getSignature()
public abstract void init(org.apache.mina.core.session.IoSession session,
SshTransport transport,
String clientId,
String serverId,
byte[] clientKexInit,
byte[] serverKexInit,
com.maverick.ssh.components.SshPrivateKey prvkey,
com.maverick.ssh.components.SshPublicKey pubkey,
boolean firstPacketFollows,
boolean useFirstPacket)
throws IOException
transport - clientId - serverId - clientKexInit - serverKexInit - prvkey - pubkey - firstPacketFollows - useFirstPacket - IOExceptionpublic abstract boolean processMessage(byte[] msg)
throws com.maverick.ssh.SshException,
IOException
msg - IOExceptioncom.maverick.ssh.SshExceptionpublic void reset()
Copyright © 2012. All Rights Reserved.