GRPC Core
9.0.0
|
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#include <stdlib.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
grpc_tls_credential_reload_config* grpc_tls_credential_reload_config_create | ( | const void * | config_user_data, |
int(*)(void *config_user_data, grpc_tls_credential_reload_arg *arg) | schedule, | ||
void(*)(void *config_user_data, grpc_tls_credential_reload_arg *arg) | cancel, | ||
void(*)(void *config_user_data) | destruct | ||
) |
Create a grpc_tls_credential_reload_config instance.
grpc_tls_credentials_options* grpc_tls_credentials_options_create | ( | void | ) |
– Wrapper APIs declared in grpc_security.h –
Create an empty TLS credentials options.
int grpc_tls_credentials_options_set_cert_request_type | ( | grpc_tls_credentials_options * | options, |
grpc_ssl_client_certificate_request_type | type | ||
) |
Set grpc_ssl_client_certificate_request_type field in credentials options with the provided type.
options should not be NULL. It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
int grpc_tls_credentials_options_set_credential_reload_config | ( | grpc_tls_credentials_options * | options, |
grpc_tls_credential_reload_config * | config | ||
) |
Set grpc_tls_credential_reload_config field in credentials options with the provided config struct whose ownership is transferred.
Both parameters should not be NULL. It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
int grpc_tls_credentials_options_set_key_materials_config | ( | grpc_tls_credentials_options * | options, |
grpc_tls_key_materials_config * | config | ||
) |
Set grpc_tls_key_materials_config field in credentials options with the provided config struct whose ownership is transferred.
Both parameters should not be NULL. It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
int grpc_tls_credentials_options_set_server_authorization_check_config | ( | grpc_tls_credentials_options * | options, |
grpc_tls_server_authorization_check_config * | config | ||
) |
Set grpc_tls_server_authorization_check_config field in credentials options with the provided config struct whose ownership is transferred.
Both parameters should not be NULL. It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
grpc_tls_key_materials_config* grpc_tls_key_materials_config_create | ( | void | ) |
— TLS key materials config.
— It is used for experimental purpose for now and subject to change. Create an empty grpc_tls_key_materials_config instance. It is used for experimental purpose for now and subject to change.
int grpc_tls_key_materials_config_get_version | ( | grpc_tls_key_materials_config * | config | ) |
Get the version number of a grpc_tls_key_materials_config instance.
It returns the version number on success and -1 on failure. It is used for experimental purpose for now and subject to change.
int grpc_tls_key_materials_config_set_key_materials | ( | grpc_tls_key_materials_config * | config, |
const char * | pem_root_certs, | ||
const grpc_ssl_pem_key_cert_pair ** | pem_key_cert_pairs, | ||
size_t | num_key_cert_pairs | ||
) |
Set grpc_tls_key_materials_config instance with provided a TLS certificate.
config will take the ownership of pem_root_certs and pem_key_cert_pairs. It's valid for the caller to provide nullptr pem_root_certs, in which case the gRPC-provided root cert will be used. pem_key_cert_pairs should not be NULL. It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
int grpc_tls_key_materials_config_set_version | ( | grpc_tls_key_materials_config * | config, |
int | version | ||
) |
Set grpc_tls_key_materials_config instance with a provided version number, which is used to keep track of the version of key materials.
It returns 1 on success and 0 on failure. It is used for experimental purpose for now and subject to change.
grpc_tls_server_authorization_check_config* grpc_tls_server_authorization_check_config_create | ( | const void * | config_user_data, |
int(*)(void *config_user_data, grpc_tls_server_authorization_check_arg *arg) | schedule, | ||
void(*)(void *config_user_data, grpc_tls_server_authorization_check_arg *arg) | cancel, | ||
void(*)(void *config_user_data) | destruct | ||
) |
Create a grpc_tls_server_authorization_check_config instance.