ch.ethz.ssh2.transport
Class KexManager
java.lang.Object
ch.ethz.ssh2.transport.KexManager
public class KexManager
- extends java.lang.Object
KexManager.
- Version:
- 2.50, 03/15/10
- Author:
- Christian Plattner
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final Logger log
kxs
KexState kxs
kexCount
int kexCount
km
KeyMaterial km
sessionId
byte[] sessionId
csh
ClientServerHello csh
accessLock
final java.lang.Object accessLock
lastConnInfo
ConnectionInfo lastConnInfo
connectionClosed
boolean connectionClosed
ignore_next_kex_packet
boolean ignore_next_kex_packet
tm
final TransportManager tm
nextKEXcryptoWishList
CryptoWishList nextKEXcryptoWishList
nextKEXdhgexParameters
DHGexParameters nextKEXdhgexParameters
verifier
ServerHostKeyVerifier verifier
hostname
final java.lang.String hostname
port
final int port
rnd
final java.security.SecureRandom rnd
KexManager
public KexManager(TransportManager tm,
ClientServerHello csh,
CryptoWishList initialCwl,
java.lang.String hostname,
int port,
ServerHostKeyVerifier keyVerifier,
java.security.SecureRandom rnd)
getOrWaitForConnectionInfo
public ConnectionInfo getOrWaitForConnectionInfo(int minKexCount)
throws java.io.IOException
- Throws:
java.io.IOException
getFirstMatch
private java.lang.String getFirstMatch(java.lang.String[] client,
java.lang.String[] server)
throws NegotiateException
- Throws:
NegotiateException
compareFirstOfNameList
private boolean compareFirstOfNameList(java.lang.String[] a,
java.lang.String[] b)
isGuessOK
private boolean isGuessOK(KexParameters cpar,
KexParameters spar)
mergeKexParameters
private NegotiatedParameters mergeKexParameters(KexParameters client,
KexParameters server)
initiateKEX
public void initiateKEX(CryptoWishList cwl,
DHGexParameters dhgex)
throws java.io.IOException
- Throws:
java.io.IOException
establishKeyMaterial
private boolean establishKeyMaterial()
finishKex
private void finishKex()
throws java.io.IOException
- Throws:
java.io.IOException
getDefaultServerHostkeyAlgorithmList
public static final java.lang.String[] getDefaultServerHostkeyAlgorithmList()
checkServerHostkeyAlgorithmsList
public static final void checkServerHostkeyAlgorithmsList(java.lang.String[] algos)
getDefaultKexAlgorithmList
public static final java.lang.String[] getDefaultKexAlgorithmList()
checkKexAlgorithmList
public static final void checkKexAlgorithmList(java.lang.String[] algos)
verifySignature
private boolean verifySignature(byte[] sig,
byte[] hostkey)
throws java.io.IOException
- Throws:
java.io.IOException
handleMessage
public void handleMessage(byte[] msg,
int msglen)
throws java.io.IOException
- Throws:
java.io.IOException