public class HostKeyFingerprintVerifier extends java.lang.Object implements HostKeyVerificationService
SshHostKeys
usage.
Methods of this class are not thread-safe.
All methods throw NullPointerException
if some object
parameter is null
and IllegalArgumentException
if some parameter doesn't correspond to the method contract.HostKeyVerificationService.InvalidHostKeyException, HostKeyVerificationService.OperationException
NULL
Constructor and Description |
---|
HostKeyFingerprintVerifier(SshHostKeys knownKeys)
Creates a new verifier instance.
|
Modifier and Type | Method and Description |
---|---|
void |
assertKeyValid(java.net.InetAddress host,
java.security.PublicKey key)
Checks if specified key is valid.
|
SshHostKeys |
getKnownKeys()
Returns allowed host keys.
|
java.lang.String |
toString() |
public HostKeyFingerprintVerifier(SshHostKeys knownKeys)
knownKeys
- allowed host keyspublic SshHostKeys getKnownKeys()
public void assertKeyValid(java.net.InetAddress host, java.security.PublicKey key) throws HostKeyVerificationService.OperationException
HostKeyVerificationService
assertKeyValid
in interface HostKeyVerificationService
host
- a server hostkey
- a server keyHostKeyVerificationService.OperationException
- if an error occurspublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved