class ExternalCertificateVerifier
Defined at line 142 of file ../../third_party/grpc-migrating/src/include/grpcpp/security/tls_certificate_verifier.h
The base class of all external, user-specified verifiers. Users should
inherit this class to implement a custom verifier.
Note that while implementing the custom verifier that extends this class, it
is possible to compose an existing ExternalCertificateVerifier or
CertificateVerifier, inside the Verify() and Cancel() function of the new
custom verifier.
Public Methods
template <typename Subclass, typename... Args>
std::shared_ptr<CertificateVerifier> Create (Args &&... args)
A factory method for creating a |CertificateVerifier| from this class. All
the user-implemented verifiers should use this function to be converted to
verifiers compatible with |TlsCredentialsOptions|.
The resulting CertificateVerifier takes ownership of the newly instantiated
Subclass.
Defined at line 150 of file ../../third_party/grpc-migrating/src/include/grpcpp/security/tls_certificate_verifier.h
bool Verify (TlsCustomVerificationCheckRequest * request, std::function<void (grpc::Status)> callback, grpc::Status * sync_status)
The verification logic that will be performed after the TLS handshake
completes. Implementers can choose to do their checks synchronously or
asynchronously.
request: the verification information associated with this request
callback: This should only be used if your check is done asynchronously.
When the asynchronous work is done, invoke this callback function
with the proper status, indicating the success or the failure of
the check. The implementer MUST NOT invoke this |callback| in the
same thread before Verify() returns, otherwise it can lead to
deadlocks.
sync_status: This should only be used if your check is done synchronously.
Modifies this value to indicate the success or the failure of
the check.
return: return true if your check is done synchronously, otherwise return
false
void Cancel (TlsCustomVerificationCheckRequest * request)
Cancels a verification request previously started via Verify().
Used when the connection attempt times out or is cancelled while an async
verification request is pending. The implementation should abort whatever
async operation it is waiting for and quickly invoke the callback that was
passed to Verify() with a status indicating the cancellation.
request: the verification information associated with this request
Protected Methods
void ExternalCertificateVerifier ()
void ~ExternalCertificateVerifier ()