CertificateAuthorityVerifier

class CertificateAuthorityVerifier @JvmOverloads constructor(hostname: String, trustedAuthorities: List<PublicKey>, revocations: SshKeyRevocationList? = null) : HostKeyVerifier(source)

Trust host certificates issued by one of trustedAuthorities for hostname. The hostname is the logical destination name, including with a custom transport, without brackets or a port. CA keys and optional revocations are snapshots.

Constructors

Link copied to clipboard
constructor(hostname: String, trustedAuthorities: List<PublicKey>, revocations: SshKeyRevocationList? = null)

Functions

Link copied to clipboard
open suspend fun addKeys(keys: List<PublicKey>)

Persist the supported keys advertised by an authenticated server after every requested proof of private-key possession has been verified. Runs outside packet routing. Read-only verifiers may keep the default implementation.

Link copied to clipboard
open suspend fun removeKeys(keys: List<PublicKey>)

Retire the authenticated key when omitted from the advertisement, after addKeys returns successfully. Other stored keys are not enumerated or removed.

Link copied to clipboard
open suspend override fun verify(key: PublicKey): Boolean

Verify the server's host key.