Go to the documentation of this file.
19 #ifndef GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
20 #define GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
41 namespace experimental {
105 std::shared_ptr<TlsServerAuthorizationCheckInterface>
106 server_authorization_check_interface);
110 if (server_authorization_check_interface_ ==
nullptr) {
112 if (arg !=
nullptr) {
115 "the interface of the server authorization check config is "
120 return server_authorization_check_interface_->Schedule(arg);
124 if (server_authorization_check_interface_ ==
nullptr) {
126 if (arg !=
nullptr) {
129 "the interface of the server authorization check config is "
134 server_authorization_check_interface_->Cancel(arg);
144 std::shared_ptr<TlsServerAuthorizationCheckInterface>
145 server_authorization_check_interface_;
158 std::shared_ptr<CertificateProviderInterface> certificate_provider);
185 return c_credentials_options_;
189 std::shared_ptr<CertificateProviderInterface> certificate_provider_;
198 std::shared_ptr<CertificateProviderInterface> certificate_provider)
207 std::shared_ptr<TlsServerAuthorizationCheckConfig>
208 authorization_check_config);
218 std::shared_ptr<CertificateProviderInterface> certificate_provider)
232 #endif // GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
TLS server authorization check config, wraps grps_tls_server_authorization_check_config.
Definition: tls_credentials_options.h:102
struct grpc_tls_server_authorization_check_config grpc_tls_server_authorization_check_config
Config for TLS server authorization check.
Definition: grpc_security.h:748
TlsServerAuthorizationCheckConfig(std::shared_ptr< TlsServerAuthorizationCheckInterface > server_authorization_check_interface)
~TlsServerAuthorizationCheckConfig()
void set_cert_request_type(grpc_ssl_client_certificate_request_type cert_request_type)
grpc_status_code
Definition: status.h:26
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
std::string error_details() const
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
TlsServerAuthorizationCheckArg(grpc_tls_server_authorization_check_arg *arg)
TlsServerAuthorizationCheckArg does not take ownership of the C arg passed to the constructor.
virtual int Schedule(TlsServerAuthorizationCheckArg *arg)=0
A callback that invokes the server authorization check.
std::string peer_cert() const
void Cancel(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:123
TlsServerCredentialsOptions(std::shared_ptr< CertificateProviderInterface > certificate_provider)
Definition: tls_credentials_options.h:217
void set_target_name(const std::string &target_name)
void set_server_verification_option(grpc_tls_server_verification_option server_verification_option)
virtual void Cancel(TlsServerAuthorizationCheckArg *)
A callback that cancels a server authorization check request.
Definition: tls_credentials_options.h:96
void set_root_cert_name(const std::string &root_cert_name)
std::string target_name() const
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:761
grpc_tls_credentials_options * c_credentials_options() const
Definition: tls_credentials_options.h:184
~TlsServerAuthorizationCheckArg()
Definition: tls_credentials_options.h:195
int Schedule(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:109
void set_peer_cert(const std::string &peer_cert)
TLS server authorization check arguments, wraps grpc_tls_server_authorization_check_arg.
Definition: tls_credentials_options.h:52
void set_peer_cert_full_chain(const std::string &peer_cert_full_chain)
void set_status(grpc_status_code status)
grpc_ssl_client_certificate_request_type
Definition: grpc_security_constants.h:62
void set_identity_cert_name(const std::string &identity_cert_name)
grpc_tls_server_verification_option
Definition: grpc_security_constants.h:122
void * cb_user_data() const
Getters for member fields.
TlsCredentialsOptions(std::shared_ptr< CertificateProviderInterface > certificate_provider)
@ GRPC_STATUS_NOT_FOUND
Some requested entity (e.g., file or directory) was not found.
Definition: status.h:54
void set_server_authorization_check_config(std::shared_ptr< TlsServerAuthorizationCheckConfig > authorization_check_config)
An interface that the application derives and uses to instantiate a TlsServerAuthorizationCheckConfig...
Definition: tls_credentials_options.h:91
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:755
void set_success(int success)
grpc_tls_server_authorization_check_config * c_config() const
Returns C struct for the server authorization check config.
Definition: tls_credentials_options.h:138
std::string peer_cert_full_chain() const
Definition: tls_credentials_options.h:215
void watch_identity_key_cert_pairs()
void set_cb_user_data(void *cb_user_data)
Setters for member fields.
void OnServerAuthorizationCheckDoneCallback()
Calls the C arg's callback function.
Definition: tls_credentials_options.h:151
Definition: async_unary_call.h:398
TlsChannelCredentialsOptions(std::shared_ptr< CertificateProviderInterface > certificate_provider)
Definition: tls_credentials_options.h:197
virtual ~TlsServerAuthorizationCheckInterface()=default
void set_error_details(const std::string &error_details)
#define GPR_ERROR
Definition: log.h:57
A struct containing all information necessary to schedule/cancel a server authorization check request...
Definition: grpc_security.h:932
grpc_status_code status() const