Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::TlsChannelSecurityConnector Class Referencefinal

#include <tls_security_connector.h>

Inheritance diagram for grpc_core::TlsChannelSecurityConnector:
Inheritance graph
[legend]

Classes

class  ChannelPendingVerifierRequest
 
class  TlsChannelCertificateWatcher
 

Public Member Functions

void add_handshakers (const grpc_channel_args *args, grpc_pollset_set *interested_parties, HandshakeManager *handshake_mgr) override
 Registers handshakers with handshake_mgr. More...
 
void cancel_check_peer (grpc_closure *on_peer_checked, grpc_error_handle error) override
 
void check_peer (tsi_peer peer, grpc_endpoint *ep, RefCountedPtr< grpc_auth_context > *auth_context, grpc_closure *on_peer_checked) override
 
ArenaPromise< absl::StatusCheckCallHost (absl::string_view host, grpc_auth_context *auth_context) override
 
tsi_ssl_client_handshaker_factoryClientHandshakerFactoryForTesting ()
 
int cmp (const grpc_security_connector *other_sc) const override
 
absl::optional< PemKeyCertPairListKeyCertPairListForTesting ()
 
absl::optional< absl::string_viewRootCertsForTesting ()
 
 TlsChannelSecurityConnector (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)
 
 ~TlsChannelSecurityConnector () override
 
- Public Member Functions inherited from grpc_channel_security_connector
const grpc_channel_credentialschannel_creds () const
 
 grpc_channel_security_connector (absl::string_view url_scheme, grpc_core::RefCountedPtr< grpc_channel_credentials > channel_creds, grpc_core::RefCountedPtr< grpc_call_credentials > request_metadata_creds)
 
grpc_channel_credentialsmutable_channel_creds ()
 
grpc_call_credentialsmutable_request_metadata_creds ()
 
const grpc_call_credentialsrequest_metadata_creds () const
 
grpc_core::UniqueTypeName type () const override
 
- Public Member Functions inherited from grpc_security_connector
 grpc_security_connector (absl::string_view url_scheme)
 
absl::string_view url_scheme () const
 
- Public Member Functions inherited from grpc_core::RefCounted< grpc_security_connector >
RefCountedoperator= (const RefCounted &)=delete
 
RefCountedPtr< grpc_security_connectorRef () GRPC_MUST_USE_RESULT
 
RefCountedPtr< grpc_security_connectorRef (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
 RefCounted (const RefCounted &)=delete
 
RefCountedPtr< grpc_security_connectorRefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< grpc_security_connectorRefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
 ~RefCounted ()=default
 
- Public Member Functions inherited from grpc_core::PolymorphicRefCount
virtual ~PolymorphicRefCount ()=default
 

Static Public Member Functions

static RefCountedPtr< grpc_channel_security_connectorCreateTlsChannelSecurityConnector (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)
 
- Static Public Member Functions inherited from grpc_security_connector
static absl::string_view ChannelArgName ()
 
static int ChannelArgsCompare (const grpc_security_connector *a, const grpc_security_connector *b)
 

Private Member Functions

tsi_ssl_client_handshaker_factory *client_handshaker_factory_ ABSL_GUARDED_BY (mu_)
 
tsi_ssl_session_cache *ssl_session_cache_ ABSL_GUARDED_BY (mu_)
 
absl::optional< absl::string_view > pem_root_certs_ ABSL_GUARDED_BY (mu_)
 
absl::optional< PemKeyCertPairList > pem_key_cert_pair_list_ ABSL_GUARDED_BY (mu_)
 
std::map< grpc_closure *, ChannelPendingVerifierRequest * > pending_verifier_requests_ ABSL_GUARDED_BY (verifier_request_map_mu_)
 
grpc_security_status UpdateHandshakerFactoryLocked () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 

Private Attributes

grpc_tls_certificate_distributor::TlsCertificatesWatcherInterfacecertificate_watcher_ = nullptr
 
Mutex mu_
 
RefCountedPtr< grpc_tls_credentials_optionsoptions_
 
std::string overridden_target_name_
 
std::string target_name_
 
RefCountedPtr< TlsSessionKeyLoggertls_session_key_logger_
 
Mutex verifier_request_map_mu_
 

Additional Inherited Members

- Public Types inherited from grpc_core::RefCounted< grpc_security_connector >
using RefCountedChildType = grpc_security_connector
 
- Protected Member Functions inherited from grpc_channel_security_connector
int channel_security_connector_cmp (const grpc_channel_security_connector *other) const
 
- Protected Member Functions inherited from grpc_core::RefCounted< grpc_security_connector >
 RefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 

Detailed Description

Definition at line 56 of file tls_security_connector.h.

Constructor & Destructor Documentation

◆ TlsChannelSecurityConnector()

grpc_core::TlsChannelSecurityConnector::TlsChannelSecurityConnector ( 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 
)

Definition at line 261 of file tls_security_connector.cc.

◆ ~TlsChannelSecurityConnector()

grpc_core::TlsChannelSecurityConnector::~TlsChannelSecurityConnector ( )
override

Definition at line 317 of file tls_security_connector.cc.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/5]

tsi_ssl_client_handshaker_factory* client_handshaker_factory_ grpc_core::TlsChannelSecurityConnector::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/5]

tsi_ssl_session_cache* ssl_session_cache_ grpc_core::TlsChannelSecurityConnector::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/5]

absl::optional<absl::string_view> pem_root_certs_ grpc_core::TlsChannelSecurityConnector::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [4/5]

absl::optional<PemKeyCertPairList> pem_key_cert_pair_list_ grpc_core::TlsChannelSecurityConnector::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [5/5]

std::map<grpc_closure* , ChannelPendingVerifierRequest*> pending_verifier_requests_ grpc_core::TlsChannelSecurityConnector::ABSL_GUARDED_BY ( verifier_request_map_mu_  )
private

◆ add_handshakers()

void grpc_core::TlsChannelSecurityConnector::add_handshakers ( const grpc_channel_args args,
grpc_pollset_set interested_parties,
HandshakeManager handshake_mgr 
)
overridevirtual

Registers handshakers with handshake_mgr.

Implements grpc_channel_security_connector.

Definition at line 332 of file tls_security_connector.cc.

◆ cancel_check_peer()

void grpc_core::TlsChannelSecurityConnector::cancel_check_peer ( grpc_closure on_peer_checked,
grpc_error_handle  error 
)
overridevirtual

Implements grpc_security_connector.

Definition at line 379 of file tls_security_connector.cc.

◆ check_peer()

void grpc_core::TlsChannelSecurityConnector::check_peer ( tsi_peer  peer,
grpc_endpoint ep,
RefCountedPtr< grpc_auth_context > *  auth_context,
grpc_closure on_peer_checked 
)
overridevirtual

Implements grpc_security_connector.

Definition at line 354 of file tls_security_connector.cc.

◆ CheckCallHost()

ArenaPromise< absl::Status > grpc_core::TlsChannelSecurityConnector::CheckCallHost ( absl::string_view  host,
grpc_auth_context auth_context 
)
overridevirtual

Checks that the host that will be set for a call is acceptable. Returns ok if the host is acceptable, otherwise returns an error.

Implements grpc_channel_security_connector.

Definition at line 421 of file tls_security_connector.cc.

◆ ClientHandshakerFactoryForTesting()

tsi_ssl_client_handshaker_factory* grpc_core::TlsChannelSecurityConnector::ClientHandshakerFactoryForTesting ( )
inline

Definition at line 93 of file tls_security_connector.h.

◆ cmp()

int grpc_core::TlsChannelSecurityConnector::cmp ( const grpc_security_connector other_sc) const
overridevirtual

Implements grpc_security_connector.

Definition at line 409 of file tls_security_connector.cc.

◆ CreateTlsChannelSecurityConnector()

RefCountedPtr< grpc_channel_security_connector > grpc_core::TlsChannelSecurityConnector::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 
)
static

Definition at line 231 of file tls_security_connector.cc.

◆ KeyCertPairListForTesting()

absl::optional<PemKeyCertPairList> grpc_core::TlsChannelSecurityConnector::KeyCertPairListForTesting ( )
inline

Definition at line 103 of file tls_security_connector.h.

◆ RootCertsForTesting()

absl::optional<absl::string_view> grpc_core::TlsChannelSecurityConnector::RootCertsForTesting ( )
inline

Definition at line 98 of file tls_security_connector.h.

◆ UpdateHandshakerFactoryLocked()

grpc_security_status grpc_core::TlsChannelSecurityConnector::UpdateHandshakerFactoryLocked ( )
private

Definition at line 526 of file tls_security_connector.cc.

Member Data Documentation

◆ certificate_watcher_

grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface* grpc_core::TlsChannelSecurityConnector::certificate_watcher_ = nullptr
private

Definition at line 162 of file tls_security_connector.h.

◆ mu_

Mutex grpc_core::TlsChannelSecurityConnector::mu_
private

Definition at line 156 of file tls_security_connector.h.

◆ options_

RefCountedPtr<grpc_tls_credentials_options> grpc_core::TlsChannelSecurityConnector::options_
private

Definition at line 160 of file tls_security_connector.h.

◆ overridden_target_name_

std::string grpc_core::TlsChannelSecurityConnector::overridden_target_name_
private

Definition at line 164 of file tls_security_connector.h.

◆ target_name_

std::string grpc_core::TlsChannelSecurityConnector::target_name_
private

Definition at line 163 of file tls_security_connector.h.

◆ tls_session_key_logger_

RefCountedPtr<TlsSessionKeyLogger> grpc_core::TlsChannelSecurityConnector::tls_session_key_logger_
private

Definition at line 168 of file tls_security_connector.h.

◆ verifier_request_map_mu_

Mutex grpc_core::TlsChannelSecurityConnector::verifier_request_map_mu_
private

Definition at line 159 of file tls_security_connector.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37