public class X509HostKeyVerification extends java.lang.Object implements HostKeyVerification
HostKeyVerification implementation that will validate an X509 public key.| Constructor and Description |
|---|
X509HostKeyVerification(boolean enableRevocation)
This creates a verification instance that will check the validation of a certificate
against the Java runtime's trusted CA certs keystore.
|
X509HostKeyVerification(java.util.Set<java.security.cert.TrustAnchor> trustAnchors,
boolean enableRevocation)
This creates a verification instance against a specific set of TrustAnchors
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
verifyHost(java.lang.String host,
SshPublicKey pk)
Verify that the public key is acceptable for the host.
|
public X509HostKeyVerification(boolean enableRevocation)
throws java.io.IOException,
java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.cert.CertificateException,
java.security.InvalidAlgorithmParameterException
enableRevocation - java.io.IOExceptionjava.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateExceptionjava.security.InvalidAlgorithmParameterExceptionpublic X509HostKeyVerification(java.util.Set<java.security.cert.TrustAnchor> trustAnchors,
boolean enableRevocation)
throws java.security.InvalidAlgorithmParameterException
trustAnchors - enableRevocation - java.security.InvalidAlgorithmParameterExceptionpublic boolean verifyHost(java.lang.String host,
SshPublicKey pk)
throws SshException
HostKeyVerificationverifyHost in interface HostKeyVerificationhost - the name of the connected hostpk - the public key supplied by the hosttrue if the host key is acceptable otherwise
falseSshExceptionCopyright © 2022. All rights reserved.