TlsContext.setVerifyCallback

void setVerifyCallback(TlsVerifyCallback callback)

Sets a custom peer verification callback.

If set, this is called after standard verification (if any). Return true to accept, false to reject. A rejection fails the handshake as TlsProgress.ERROR with a CERTIFICATE_ERROR lastError.

Use cases include certificate pinning, custom CA handling, and audit logging.

Parameters

callbackThe verification callback, or null to clear.