public abstract class ExtendedServerHostKeyVerifier extends java.lang.Object implements ServerHostKeyVerifier
ServerHostKeyVerifier interface by allowing the remote server to indicate it has multiple
server key algorithms available. After authentication, the getKnownKeyAlgorithmsForHost(String, int) method
may be called and compared against the list of server-controller keys. If a key algorithm has been added then
addServerHostKey(String, int, String, byte[]) will be called. If a key algorithm has been removed, then
removeServerHostKey(String, int, String, byte[]) will be called.| Constructor and Description |
|---|
ExtendedServerHostKeyVerifier() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addServerHostKey(java.lang.String hostname,
int port,
java.lang.String keyAlgorithm,
byte[] serverHostKey)
After authentication, if the server indicates it has another
keyAlgorithm, this method will be
called for the app to add it to its record of known keys for this hostname. |
abstract java.util.List<java.lang.String> |
getKnownKeyAlgorithmsForHost(java.lang.String hostname,
int port)
Called during connection to determine which keys are known for this host.
|
abstract void |
removeServerHostKey(java.lang.String hostname,
int port,
java.lang.String serverHostKeyAlgorithm,
byte[] serverHostKey)
After authentication, if the server indicates it no longer uses this key, this method will be called
for the app to remove its record of it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitverifyServerHostKeypublic abstract java.util.List<java.lang.String> getKnownKeyAlgorithmsForHost(java.lang.String hostname,
int port)
hostname - the hostname used to create the Connection objectport - the server's remote TCP porthostname and port combination
or null if none are known.public abstract void removeServerHostKey(java.lang.String hostname,
int port,
java.lang.String serverHostKeyAlgorithm,
byte[] serverHostKey)
hostname - the hostname used to create the Connection objectport - the server's remote TCP portserverHostKeyAlgorithm - key algorithm of removed keyserverHostKey - key data of removed keypublic abstract void addServerHostKey(java.lang.String hostname,
int port,
java.lang.String keyAlgorithm,
byte[] serverHostKey)
keyAlgorithm, this method will be
called for the app to add it to its record of known keys for this hostname.hostname - the hostname used to create the Connection objectport - the server's remote TCP portkeyAlgorithm - SSH standard name for the key to be addedserverHostKey - SSH encoding of the key data for the key to be added