|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.ssh2.SSH2TransportEventAdapter
com.mindbright.ssh2.SSH2HostKeyVerifier
public class SSH2HostKeyVerifier
This class is an adapter for the interface
SSH2TransportEventHandler
.
SSH2TransportEventHandler
Field Summary | |
---|---|
protected java.lang.String |
fingerprint
|
protected PublicKey |
publickey
|
Constructor Summary | |
---|---|
SSH2HostKeyVerifier(PublicKey publickey)
Create an instance which will verify that the hostkey matches the given public key. |
|
SSH2HostKeyVerifier(java.lang.String fingerprint)
Create an instance which will verify that the hostkey matches a public key with the given fingerprint. |
Method Summary | |
---|---|
static boolean |
compareFingerprints(java.lang.String fingerprint,
SSH2Signature serverHostKey)
Static utility function which can be used to compare a server key against a fingerprint. |
static boolean |
comparePublicKeys(PublicKey p1,
PublicKey p2)
Static utility functions which can compare two public keys. |
boolean |
kexAuthenticateHost(SSH2Transport tp,
SSH2Signature serverHostKey)
Perform the authenticate host stage of key exchange. |
Methods inherited from class com.mindbright.ssh2.SSH2TransportEventAdapter |
---|
fatalDisconnect, gotConnectInfoText, gotPeerVersion, kexAgreed, kexComplete, kexStart, msgDebug, msgIgnore, msgUnimplemented, normalDisconnect, peerDisconnect, peerSentUnknownMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String fingerprint
protected PublicKey publickey
Constructor Detail |
---|
public SSH2HostKeyVerifier(PublicKey publickey)
publickey
- The public key to verify against.public SSH2HostKeyVerifier(java.lang.String fingerprint)
fingerprint
- The fingerprint which should match the public key.Method Detail |
---|
public boolean kexAuthenticateHost(SSH2Transport tp, SSH2Signature serverHostKey)
kexAuthenticateHost
in interface SSH2TransportEventHandler
kexAuthenticateHost
in class SSH2TransportEventAdapter
tp
- Indentifies the SSH2Transport
object
handling the connection.serverHostKey
- Signature object which holds the server keys.
public static boolean compareFingerprints(java.lang.String fingerprint, SSH2Signature serverHostKey)
fingerprint
- The fingerprint to check.serverHostKey
- Signature object which holds the server keys.
public static boolean comparePublicKeys(PublicKey p1, PublicKey p2)
p1
- Public key to compare.p2
- Public key to compare.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |