Show / Hide Table of Contents

Delegate VerifyPeerCallback

Callback invoked with the expected targetHost and the peer's certificate. If false is returned by this callback then it is treated as a verification failure and the attempted connection will fail. Invocation of the callback is blocking, so any implementation should be light-weight. Note that the callback can potentially be invoked multiple times, concurrently from different threads (e.g. when multiple connections are being created for the same credentials).

Namespace: Grpc.Core
Assembly: Grpc.Core.dll
Syntax
public delegate bool VerifyPeerCallback(VerifyPeerContext context);
Parameters
Type Name Description
VerifyPeerContext context

The VerifyPeerContext associated with the callback

Returns
Type Description
System.Boolean

true if verification succeeded, false otherwise.

Back to top