HostKeyVerifier

Verifies the identity of a server by checking its host key.

Implementations of this interface determine whether a server's host key is trusted. This is typically done by consulting a known_hosts database.

Inheritors

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
abstract suspend fun verify(key: PublicKey): Boolean

Verify the server's host key.