Go to the documentation of this file.
26 #include "absl/strings/string_view.h"
49 if (is_client &&
options->cert_request_type() !=
52 "Client's credentials options should not set cert_request_type.");
54 if (!is_client && !
options->verify_server_cert()) {
56 "Server's credentials options should not set verify_server_cert.");
59 if (is_client &&
options->certificate_verifier() ==
nullptr) {
64 "No verifier specified on the client side. Using default hostname "
66 options->set_certificate_verifier(
67 grpc_core::MakeRefCounted<grpc_core::HostNameCertificateVerifier>());
85 const char* overridden_target_name =
nullptr;
87 for (
size_t i = 0;
args !=
nullptr &&
i <
args->num_args;
i++) {
91 overridden_target_name =
arg->
value.string;
102 overridden_target_name, ssl_session_cache);
106 if (
args !=
nullptr) {
148 if (!CredentialOptionSanityCheck(
options,
true )) {
157 if (!CredentialOptionSanityCheck(
options,
false )) {
static RefCountedPtr< grpc_channel_security_connector > CreateTlsChannelSecurityConnector(RefCountedPtr< grpc_channel_credentials > channel_creds, RefCountedPtr< grpc_tls_credentials_options > options, RefCountedPtr< grpc_call_credentials > request_metadata_creds, const char *target_name, const char *overridden_target_name, tsi_ssl_session_cache *ssl_session_cache)
grpc_arg grpc_channel_arg_string_create(char *name, char *value)
grpc_core::UniqueTypeName type() const override
grpc_core::RefCountedPtr< grpc_server_security_connector > create_security_connector(const grpc_channel_args *) override
grpc_channel_credentials * grpc_tls_credentials_create(grpc_tls_credentials_options *options)
TlsServerCredentials(grpc_core::RefCountedPtr< grpc_tls_credentials_options > options)
grpc_core::RefCountedPtr< grpc_tls_credentials_options > options_
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG
static RefCountedPtr< grpc_server_security_connector > CreateTlsServerSecurityConnector(RefCountedPtr< grpc_server_credentials > server_creds, RefCountedPtr< grpc_tls_credentials_options > options)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
std::shared_ptr< ServerCredentials > TlsServerCredentials(const experimental::TlsServerCredentialsOptions &options)
Builds TLS ServerCredentials given TLS options.
grpc_server_credentials * grpc_tls_server_credentials_create(grpc_tls_credentials_options *options)
void call_creds(grpc_end2end_test_config config)
~TlsServerCredentials() override
grpc_core::RefCountedPtr< grpc_channel_security_connector > create_security_connector(grpc_core::RefCountedPtr< grpc_call_credentials > call_creds, const char *target_name, const grpc_channel_args *args, grpc_channel_args **new_args) override
TlsCredentials(grpc_core::RefCountedPtr< grpc_tls_credentials_options > options)
#define GRPC_ARG_HTTP2_SCHEME
grpc_core::UniqueTypeName type() const override
std::shared_ptr< ChannelCredentials > TlsCredentials(const TlsChannelCredentialsOptions &options)
Builds TLS Credentials given TLS options.
DebugStringOptions options_
int QsortCompare(const T &a, const T &b)
struct tsi_ssl_session_cache tsi_ssl_session_cache
@ GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE
int cmp_impl(const grpc_channel_credentials *other) const override
~TlsCredentials() override
grpc_core::RefCountedPtr< grpc_tls_credentials_options > options_
#define GRPC_SSL_SESSION_CACHE_ARG
grpc_channel_args * grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add)
RefCountedPtr< grpc_channel_credentials > Ref() GRPC_MUST_USE_RESULT
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:39