19 #ifndef GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
20 #define GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
41 namespace experimental {
106 std::shared_ptr<TlsServerAuthorizationCheckInterface>
107 server_authorization_check_interface);
111 if (server_authorization_check_interface_ ==
nullptr) {
113 if (arg !=
nullptr) {
116 "the interface of the server authorization check config is "
121 return server_authorization_check_interface_->Schedule(arg);
125 if (server_authorization_check_interface_ ==
nullptr) {
127 if (arg !=
nullptr) {
130 "the interface of the server authorization check config is "
135 server_authorization_check_interface_->Cancel(arg);
145 std::shared_ptr<TlsServerAuthorizationCheckInterface>
146 server_authorization_check_interface_;
162 std::shared_ptr<CertificateProviderInterface> certificate_provider);
194 return c_credentials_options_;
198 std::shared_ptr<CertificateProviderInterface> certificate_provider_;
216 std::shared_ptr<TlsServerAuthorizationCheckConfig>
217 authorization_check_config);
229 std::shared_ptr<CertificateProviderInterface> certificate_provider)
Definition: tls_credentials_options.h:208
void set_server_authorization_check_config(std::shared_ptr< TlsServerAuthorizationCheckConfig > authorization_check_config)
void set_server_verification_option(grpc_tls_server_verification_option server_verification_option)
Definition: tls_credentials_options.h:152
grpc_tls_credentials_options * c_credentials_options() const
Definition: tls_credentials_options.h:193
void watch_identity_key_cert_pairs()
void set_identity_cert_name(const std::string &identity_cert_name)
void set_root_cert_name(const std::string &root_cert_name)
void set_certificate_provider(std::shared_ptr< CertificateProviderInterface > certificate_provider)
TLS server authorization check arguments, wraps grpc_tls_server_authorization_check_arg.
Definition: tls_credentials_options.h:52
grpc_status_code status() const
TlsServerAuthorizationCheckArg(grpc_tls_server_authorization_check_arg *arg)
TlsServerAuthorizationCheckArg does not take ownership of the C arg passed to the constructor.
void set_cb_user_data(void *cb_user_data)
Setters for member fields.
std::string peer_cert() const
std::string target_name() const
void set_error_details(const std::string &error_details)
std::string peer_cert_full_chain() const
void set_target_name(const std::string &target_name)
std::string error_details() const
void set_success(int success)
~TlsServerAuthorizationCheckArg()
void * cb_user_data() const
Getters for member fields.
void set_peer_cert(const std::string &peer_cert)
void set_status(grpc_status_code status)
void OnServerAuthorizationCheckDoneCallback()
Calls the C arg's callback function.
void set_peer_cert_full_chain(const std::string &peer_cert_full_chain)
TLS server authorization check config, wraps grps_tls_server_authorization_check_config.
Definition: tls_credentials_options.h:103
void Cancel(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:124
TlsServerAuthorizationCheckConfig(std::shared_ptr< TlsServerAuthorizationCheckInterface > server_authorization_check_interface)
~TlsServerAuthorizationCheckConfig()
grpc_tls_server_authorization_check_config * c_config() const
Returns C struct for the server authorization check config.
Definition: tls_credentials_options.h:139
int Schedule(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:110
Definition: tls_credentials_options.h:224
TlsServerCredentialsOptions(std::shared_ptr< CertificateProviderInterface > certificate_provider)
Definition: tls_credentials_options.h:228
void set_cert_request_type(grpc_ssl_client_certificate_request_type cert_request_type)
grpc_status_code
Definition: status.h:26
@ GRPC_STATUS_NOT_FOUND
Some requested entity (e.g., file or directory) was not found.
Definition: status.h:54
struct grpc_tls_server_authorization_check_config grpc_tls_server_authorization_check_config
Config for TLS server authorization check.
Definition: grpc_security.h:756
struct grpc_tls_credentials_options grpc_tls_credentials_options
A struct that can be specified by callers to configure underlying TLS behaviors.
Definition: grpc_security.h:763
struct grpc_tls_certificate_provider grpc_tls_certificate_provider
A struct provides ways to gain credential data that will be used in the TLS handshake.
Definition: grpc_security.h:769
grpc_ssl_client_certificate_request_type
Definition: grpc_security_constants.h:77
grpc_tls_server_verification_option
Definition: grpc_security_constants.h:137
#define GPR_ERROR
Definition: log.h:55
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
An interface that the application derives and uses to instantiate a TlsServerAuthorizationCheckConfig...
Definition: tls_credentials_options.h:92
virtual ~TlsServerAuthorizationCheckInterface()=default
virtual int Schedule(TlsServerAuthorizationCheckArg *arg)=0
A callback that invokes the server authorization check.
virtual void Cancel(TlsServerAuthorizationCheckArg *)
A callback that cancels a server authorization check request.
Definition: tls_credentials_options.h:97
A struct containing all information necessary to schedule/cancel a server authorization check request...
Definition: grpc_security.h:972