Go to the documentation of this file.
19 #ifndef GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
20 #define GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
40 namespace experimental {
54 return pem_key_cert_pair_list_;
69 std::vector<PemKeyCertPair> pem_key_cert_pair_list_;
102 std::vector<TlsKeyMaterialsConfig::PemKeyCertPair>
103 pem_key_cert_pair_list);
105 const std::shared_ptr<TlsKeyMaterialsConfig>& key_materials_config);
133 credential_reload_interface);
137 if (credential_reload_interface_ ==
nullptr) {
139 if (arg !=
nullptr) {
142 "the interface of the credential reload config is nullptr");
146 return credential_reload_interface_->Schedule(arg);
150 if (credential_reload_interface_ ==
nullptr) {
152 if (arg !=
nullptr) {
155 "the interface of the credential reload config is nullptr");
159 credential_reload_interface_->Cancel(arg);
167 std::shared_ptr<TlsCredentialReloadInterface> credential_reload_interface_;
232 std::shared_ptr<TlsServerAuthorizationCheckInterface>
233 server_authorization_check_interface);
237 if (server_authorization_check_interface_ ==
nullptr) {
239 if (arg !=
nullptr) {
242 "the interface of the server authorization check config is "
247 return server_authorization_check_interface_->Schedule(arg);
251 if (server_authorization_check_interface_ ==
nullptr) {
253 if (arg !=
nullptr) {
256 "the interface of the server authorization check config is "
261 server_authorization_check_interface_->Cancel(arg);
271 std::shared_ptr<TlsServerAuthorizationCheckInterface>
272 server_authorization_check_interface_;
286 std::shared_ptr<TlsServerAuthorizationCheckConfig>
301 std::shared_ptr<TlsServerAuthorizationCheckConfig>
307 return cert_request_type_;
310 return server_verification_option_;
313 return key_materials_config_;
316 return credential_reload_config_;
318 std::shared_ptr<TlsServerAuthorizationCheckConfig>
320 return server_authorization_check_config_;
323 return c_credentials_options_;
335 std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config_;
336 std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config_;
337 std::shared_ptr<TlsServerAuthorizationCheckConfig>
338 server_authorization_check_config_;
345 #endif // GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H
Definition: tls_credentials_options.h:46
int Schedule(TlsCredentialReloadArg *arg) const
Definition: tls_credentials_options.h:136
TLS credential reloag config, wraps grpc_tls_credential_reload_config.
Definition: tls_credentials_options.h:130
int version() const
Definition: tls_credentials_options.h:56
struct grpc_tls_server_authorization_check_config grpc_tls_server_authorization_check_config
Config for TLS server authorization check.
Definition: grpc_security.h:732
TLS key materials config, wrapper for grpc_tls_key_materials_config.
Definition: tls_credentials_options.h:44
grpc_tls_server_authorization_check_config * c_config() const
Returns C struct for the server authorization check config.
Definition: tls_credentials_options.h:265
~TlsServerAuthorizationCheckConfig()
TlsCredentialReloadConfig(std::shared_ptr< TlsCredentialReloadInterface > credential_reload_interface)
virtual void Cancel(TlsServerAuthorizationCheckArg *)
A callback that cancels a server authorization check request.
Definition: tls_credentials_options.h:223
grpc_status_code
Definition: status.h:26
grpc_tls_server_verification_option server_verification_option() const
Definition: tls_credentials_options.h:309
const grpc::string pem_root_certs() const
Getters for member fields.
Definition: tls_credentials_options.h:52
void set_pem_root_certs(const grpc::string &pem_root_certs)
Setter for key materials that will be called by the user.
void set_key_materials_config(const std::shared_ptr< TlsKeyMaterialsConfig > &key_materials_config)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
Log a message.
~TlsCredentialReloadConfig()
TLS credential reload arguments, wraps grpc_tls_credential_reload_arg.
Definition: tls_credentials_options.h:81
void set_key_materials(const grpc::string &pem_root_certs, std::vector< TlsKeyMaterialsConfig::PemKeyCertPair > pem_key_cert_pair_list)
grpc_ssl_certificate_config_reload_status
Callback results for dynamically loading a SSL certificate config.
Definition: grpc_security_constants.h:56
grpc::string peer_cert() const
void * cb_user_data() const
Getters for member fields.
An interface that the application derives and uses to instantiate a TlsCredentialReloadConfig instanc...
Definition: tls_credentials_options.h:120
TlsCredentialsOptions(grpc_tls_server_verification_option server_verification_option, std::shared_ptr< TlsKeyMaterialsConfig > key_materials_config, std::shared_ptr< TlsCredentialReloadConfig > credential_reload_config, std::shared_ptr< TlsServerAuthorizationCheckConfig > server_authorization_check_config)
void set_success(int success)
An interface that the application derives and uses to instantiate a TlsServerAuthorizationCheckConfig...
Definition: tls_credentials_options.h:218
void set_target_name(const grpc::string &target_name)
grpc_tls_credential_reload_config * c_config() const
Returns a C struct for the credential reload config.
Definition: tls_credentials_options.h:163
grpc::string error_details() const
virtual int Schedule(TlsCredentialReloadArg *arg)=0
A callback that invokes the credential reload.
void OnServerAuthorizationCheckDoneCallback()
Calls the C arg's callback function.
virtual ~TlsServerAuthorizationCheckInterface()=default
struct grpc_tls_credential_reload_config grpc_tls_credential_reload_config
Config for TLS credential reload.
Definition: grpc_security.h:727
void set_cb_user_data(void *cb_user_data)
Setters for member fields.
grpc_ssl_client_certificate_request_type cert_request_type() const
Getters for member fields.
Definition: tls_credentials_options.h:306
virtual void Cancel(TlsCredentialReloadArg *)
A callback that cancels a credential reload request.
Definition: tls_credentials_options.h:125
void add_pem_key_cert_pair(const TlsKeyMaterialsConfig::PemKeyCertPair &pem_key_cert_pair)
grpc::string cert_chain
Definition: tls_credentials_options.h:48
void set_version(int version)
Definition: tls_credentials_options.h:65
void set_error_details(const grpc::string &error_details)
~TlsServerAuthorizationCheckArg()
grpc_tls_credentials_options * c_credentials_options() const
Definition: tls_credentials_options.h:322
TlsServerAuthorizationCheckConfig(std::shared_ptr< TlsServerAuthorizationCheckInterface > server_authorization_check_interface)
TlsServerAuthorizationCheckArg(grpc_tls_server_authorization_check_arg *arg)
TlsServerAuthorizationCheckArg does not take ownership of the C arg passed to the constructor.
TLS credentials options, wrapper for grpc_tls_credentials_options.
Definition: tls_credentials_options.h:279
~TlsCredentialReloadArg()
Definition: grpc_security_constants.h:59
void set_peer_cert_full_chain(const grpc::string &peer_cert_full_chain)
virtual int Schedule(TlsServerAuthorizationCheckArg *arg)=0
A callback that invokes the server authorization check.
grpc_ssl_client_certificate_request_type
Definition: grpc_security_constants.h:62
void set_pem_root_certs(const grpc::string &pem_root_certs)
void set_status(grpc_ssl_certificate_config_reload_status status)
grpc_tls_server_verification_option
Definition: grpc_security_constants.h:122
grpc::string target_name() const
const std::vector< PemKeyCertPair > & pem_key_cert_pair_list() const
Definition: tls_credentials_options.h:53
void set_cb_user_data(void *cb_user_data)
Setters for member fields.
Some requested entity (e.g., file or directory) was not found.
Definition: status.h:54
struct grpc_tls_credentials_options grpc_tls_credentials_options
TLS credentials options.
Definition: grpc_security.h:737
void set_status(grpc_status_code status)
void set_peer_cert(const grpc::string &peer_cert)
A struct containing all information necessary to schedule/cancel a credential reload request.
Definition: grpc_security.h:859
bool is_pem_key_cert_pair_list_empty() const
std::shared_ptr< TlsCredentialReloadConfig > credential_reload_config() const
Definition: tls_credentials_options.h:315
grpc_ssl_certificate_config_reload_status status() const
std::string string
Definition: config.h:35
void * cb_user_data() const
Getters for member fields.
TLS server authorization check arguments, wraps grpc_tls_server_authorization_check_arg.
Definition: tls_credentials_options.h:179
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
TLS server authorization check config, wraps grps_tls_server_authorization_check_config.
Definition: tls_credentials_options.h:229
void set_key_materials(const grpc::string &pem_root_certs, const std::vector< PemKeyCertPair > &pem_key_cert_pair_list)
#define GPR_ERROR
Definition: log.h:57
TlsCredentialReloadArg(grpc_tls_credential_reload_arg *arg)
TlsCredentialReloadArg does not take ownership of the C arg that is passed to the constructor.
A struct containing all information necessary to schedule/cancel a server authorization check request...
Definition: grpc_security.h:934
virtual ~TlsCredentialReloadInterface()=default
void add_pem_key_cert_pair(const PemKeyCertPair &pem_key_cert_pair)
std::shared_ptr< TlsServerAuthorizationCheckConfig > server_authorization_check_config() const
Definition: tls_credentials_options.h:319
void Cancel(TlsCredentialReloadArg *arg) const
Definition: tls_credentials_options.h:149
int Schedule(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:236
void set_error_details(const grpc::string &error_details)
grpc_status_code status() const
grpc::string peer_cert_full_chain() const
grpc::string private_key
Definition: tls_credentials_options.h:47
void OnCredentialReloadDoneCallback()
Calls the C arg's callback function.
void Cancel(TlsServerAuthorizationCheckArg *arg) const
Definition: tls_credentials_options.h:250
std::shared_ptr< TlsKeyMaterialsConfig > key_materials_config() const
Definition: tls_credentials_options.h:312
grpc::string error_details() const