Go to the documentation of this file.
17 #ifndef GRPCPP_SECURITY_TLS_CERTIFICATE_VERIFIER_H
18 #define GRPCPP_SECURITY_TLS_CERTIFICATE_VERIFIER_H
50 namespace experimental {
72 std::vector<grpc::string_ref>
uri_names()
const;
73 std::vector<grpc::string_ref>
dns_names()
const;
75 std::vector<grpc::string_ref>
ip_names()
const;
125 static void AsyncCheckDone(
133 request_map_ ABSL_GUARDED_BY(mu_);
149 template <
typename Subclass,
typename... Args>
150 static std::shared_ptr<CertificateVerifier>
Create(Args&&... args) {
151 auto* external_verifier =
new Subclass(std::forward<Args>(args)...);
152 return std::make_shared<CertificateVerifier>(
154 external_verifier->base_));
192 struct AsyncRequestState {
196 : callback(cb), callback_arg(arg), cpp_request(request) {}
200 TlsCustomVerificationCheckRequest cpp_request;
203 static int VerifyInCoreExternalVerifier(
207 char** sync_error_details);
209 static void CancelInCoreExternalVerifier(
212 static void DestructInCoreExternalVerifier(
void* user_data);
218 std::map<grpc_tls_custom_verification_check_request*, AsyncRequestState>
219 request_map_ ABSL_GUARDED_BY(mu_);
243 #endif // GRPCPP_SECURITY_TLS_CERTIFICATE_VERIFIER_H
This class is a non owning reference to a string.
Definition: string_ref.h:41
HostNameCertificateVerifier()
std::vector< grpc::string_ref > dns_names() const
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
grpc_tls_certificate_verifier * c_verifier()
Definition: tls_certificate_verifier.h:122
grpc_status_code
Definition: status.h:28
virtual void Cancel(TlsCustomVerificationCheckRequest *request)=0
grpc::string_ref verified_root_cert_subject() const
~TlsCustomVerificationCheckRequest()
Definition: tls_certificate_verifier.h:59
static std::shared_ptr< CertificateVerifier > Create(Args &&... args)
Definition: tls_certificate_verifier.h:150
ExternalCertificateVerifier()
void Cancel(TlsCustomVerificationCheckRequest *request)
Definition: tls_certificate_verifier.h:55
Did it work? If it didn't, why?
Definition: status.h:34
Definition: tls_certificate_verifier.h:227
Definition: tls_certificate_verifier.h:142
EXPERIMENTAL API - Subject to change.
Definition: credentials.h:740
std::vector< grpc::string_ref > email_names() const
void(* grpc_tls_on_custom_verification_check_done_cb)(grpc_tls_custom_verification_check_request *request, void *callback_arg, grpc_status_code status, const char *error_details)
Definition: tls_certificate_verifier.h:42
struct grpc_tls_certificate_verifier grpc_tls_certificate_verifier
EXPERIMENTAL API - Subject to change.
Definition: credentials.h:732
bool Verify(TlsCustomVerificationCheckRequest *request, std::function< void(grpc::Status)> callback, grpc::Status *sync_status)
TlsCustomVerificationCheckRequest(grpc_tls_custom_verification_check_request *request)
grpc::string_ref peer_cert_full_chain() const
grpc_tls_certificate_verifier * grpc_tls_certificate_verifier_external_create(grpc_tls_certificate_verifier_external *external_verifier)
grpc::string_ref common_name() const
Definition: tls_certificate_verifier.h:90
std::vector< grpc::string_ref > ip_names() const
grpc::string_ref peer_cert() const
grpc::string_ref target_name() const
CertificateVerifier(grpc_tls_certificate_verifier *v)
NoOpCertificateVerifier()
EXPERIMENTAL API - Subject to change.
Definition: credentials.h:680
Definition: tls_certificate_verifier.h:235
std::vector< grpc::string_ref > uri_names() const
virtual bool Verify(TlsCustomVerificationCheckRequest *request, std::function< void(grpc::Status)> callback, grpc::Status *sync_status)=0
grpc_tls_custom_verification_check_request * c_request()
Definition: tls_certificate_verifier.h:77
virtual ~ExternalCertificateVerifier()