Classes | Macros | Typedefs | Functions
ssl_transport_security.h File Reference
#include <grpc/support/port_platform.h>
#include <openssl/x509.h>
#include "absl/strings/string_view.h"
#include <grpc/grpc_security_constants.h>
#include "src/core/tsi/ssl/key_logging/ssl_key_logging.h"
#include "src/core/tsi/transport_security_interface.h"
Include dependency graph for ssl_transport_security.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tsi_ssl_client_handshaker_options
 
struct  tsi_ssl_handshaker_factory_vtable
 
struct  tsi_ssl_pem_key_cert_pair
 
struct  tsi_ssl_server_handshaker_options
 

Macros

#define TSI_SSL_ALPN_SELECTED_PROTOCOL   "ssl_alpn_selected_protocol"
 
#define TSI_SSL_SESSION_REUSED_PEER_PROPERTY   "ssl_session_reused"
 
#define TSI_X509_CERTIFICATE_TYPE   "X509"
 
#define TSI_X509_DNS_PEER_PROPERTY   "x509_dns"
 
#define TSI_X509_EMAIL_PEER_PROPERTY   "x509_email"
 
#define TSI_X509_IP_PEER_PROPERTY   "x509_ip"
 
#define TSI_X509_PEM_CERT_CHAIN_PROPERTY   "x509_pem_cert_chain"
 
#define TSI_X509_PEM_CERT_PROPERTY   "x509_pem_cert"
 
#define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY   "x509_subject_alternative_name"
 
#define TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY   "x509_subject_common_name"
 
#define TSI_X509_SUBJECT_PEER_PROPERTY   "x509_subject"
 
#define TSI_X509_URI_PEER_PROPERTY   "x509_uri"
 

Typedefs

typedef struct tsi_ssl_client_handshaker_factory tsi_ssl_client_handshaker_factory
 
typedef struct tsi_ssl_handshaker_factory tsi_ssl_handshaker_factory
 
typedef void(* tsi_ssl_handshaker_factory_destructor) (tsi_ssl_handshaker_factory *factory)
 
typedef struct tsi_ssl_root_certs_store tsi_ssl_root_certs_store
 
typedef struct tsi_ssl_server_handshaker_factory tsi_ssl_server_handshaker_factory
 
typedef struct tsi_ssl_session_cache tsi_ssl_session_cache
 

Functions

tsi_result tsi_create_ssl_client_handshaker_factory (const tsi_ssl_pem_key_cert_pair *pem_key_cert_pair, const char *pem_root_certs, const char *cipher_suites, const char **alpn_protocols, uint16_t num_alpn_protocols, tsi_ssl_client_handshaker_factory **factory)
 
tsi_result tsi_create_ssl_client_handshaker_factory_with_options (const tsi_ssl_client_handshaker_options *options, tsi_ssl_client_handshaker_factory **factory)
 
tsi_result tsi_create_ssl_server_handshaker_factory (const tsi_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, const char *pem_client_root_certs, int force_client_auth, const char *cipher_suites, const char **alpn_protocols, uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory **factory)
 
tsi_result tsi_create_ssl_server_handshaker_factory_ex (const tsi_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, const char *pem_client_root_certs, tsi_client_certificate_request_type client_certificate_request, const char *cipher_suites, const char **alpn_protocols, uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory **factory)
 
tsi_result tsi_create_ssl_server_handshaker_factory_with_options (const tsi_ssl_server_handshaker_options *options, tsi_ssl_server_handshaker_factory **factory)
 
tsi_result tsi_ssl_client_handshaker_factory_create_handshaker (tsi_ssl_client_handshaker_factory *factory, const char *server_name_indication, size_t network_bio_buf_size, size_t ssl_bio_buf_size, tsi_handshaker **handshaker)
 
void tsi_ssl_client_handshaker_factory_unref (tsi_ssl_client_handshaker_factory *factory)
 
tsi_result tsi_ssl_extract_x509_subject_names_from_pem_cert (const char *pem_cert, tsi_peer *peer)
 
tsi_result tsi_ssl_get_cert_chain_contents (STACK_OF(X509) *peer_chain, tsi_peer_property *property)
 
const tsi_ssl_handshaker_factory_vtabletsi_ssl_handshaker_factory_swap_vtable (tsi_ssl_handshaker_factory *factory, tsi_ssl_handshaker_factory_vtable *new_vtable)
 
int tsi_ssl_peer_matches_name (const tsi_peer *peer, absl::string_view name)
 
tsi_ssl_root_certs_storetsi_ssl_root_certs_store_create (const char *pem_roots)
 
void tsi_ssl_root_certs_store_destroy (tsi_ssl_root_certs_store *self)
 
tsi_result tsi_ssl_server_handshaker_factory_create_handshaker (tsi_ssl_server_handshaker_factory *factory, size_t network_bio_buf_size, size_t ssl_bio_buf_size, tsi_handshaker **handshaker)
 
void tsi_ssl_server_handshaker_factory_unref (tsi_ssl_server_handshaker_factory *factory)
 
tsi_ssl_session_cachetsi_ssl_session_cache_create_lru (size_t capacity)
 
void tsi_ssl_session_cache_ref (tsi_ssl_session_cache *cache)
 
void tsi_ssl_session_cache_unref (tsi_ssl_session_cache *cache)
 
static constexpr bool tsi_tls_session_key_logging_supported ()
 

Macro Definition Documentation

◆ TSI_SSL_ALPN_SELECTED_PROTOCOL

#define TSI_SSL_ALPN_SELECTED_PROTOCOL   "ssl_alpn_selected_protocol"

Definition at line 44 of file ssl_transport_security.h.

◆ TSI_SSL_SESSION_REUSED_PEER_PROPERTY

#define TSI_SSL_SESSION_REUSED_PEER_PROPERTY   "ssl_session_reused"

Definition at line 41 of file ssl_transport_security.h.

◆ TSI_X509_CERTIFICATE_TYPE

#define TSI_X509_CERTIFICATE_TYPE   "X509"

Definition at line 34 of file ssl_transport_security.h.

◆ TSI_X509_DNS_PEER_PROPERTY

#define TSI_X509_DNS_PEER_PROPERTY   "x509_dns"

Definition at line 45 of file ssl_transport_security.h.

◆ TSI_X509_EMAIL_PEER_PROPERTY

#define TSI_X509_EMAIL_PEER_PROPERTY   "x509_email"

Definition at line 47 of file ssl_transport_security.h.

◆ TSI_X509_IP_PEER_PROPERTY

#define TSI_X509_IP_PEER_PROPERTY   "x509_ip"

Definition at line 48 of file ssl_transport_security.h.

◆ TSI_X509_PEM_CERT_CHAIN_PROPERTY

#define TSI_X509_PEM_CERT_CHAIN_PROPERTY   "x509_pem_cert_chain"

Definition at line 43 of file ssl_transport_security.h.

◆ TSI_X509_PEM_CERT_PROPERTY

#define TSI_X509_PEM_CERT_PROPERTY   "x509_pem_cert"

Definition at line 42 of file ssl_transport_security.h.

◆ TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY

#define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY   "x509_subject_alternative_name"

Definition at line 39 of file ssl_transport_security.h.

◆ TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY

#define TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY   "x509_subject_common_name"

Definition at line 38 of file ssl_transport_security.h.

◆ TSI_X509_SUBJECT_PEER_PROPERTY

#define TSI_X509_SUBJECT_PEER_PROPERTY   "x509_subject"

Definition at line 37 of file ssl_transport_security.h.

◆ TSI_X509_URI_PEER_PROPERTY

#define TSI_X509_URI_PEER_PROPERTY   "x509_uri"

Definition at line 46 of file ssl_transport_security.h.

Typedef Documentation

◆ tsi_ssl_client_handshaker_factory

Definition at line 97 of file ssl_transport_security.h.

◆ tsi_ssl_handshaker_factory

Definition at line 381 of file ssl_transport_security.h.

◆ tsi_ssl_handshaker_factory_destructor

typedef void(* tsi_ssl_handshaker_factory_destructor) (tsi_ssl_handshaker_factory *factory)

Definition at line 384 of file ssl_transport_security.h.

◆ tsi_ssl_root_certs_store

Definition at line 54 of file ssl_transport_security.h.

◆ tsi_ssl_server_handshaker_factory

Definition at line 233 of file ssl_transport_security.h.

◆ tsi_ssl_session_cache

Definition at line 68 of file ssl_transport_security.h.

Function Documentation

◆ tsi_create_ssl_client_handshaker_factory()

tsi_result tsi_create_ssl_client_handshaker_factory ( const tsi_ssl_pem_key_cert_pair pem_key_cert_pair,
const char *  pem_root_certs,
const char *  cipher_suites,
const char **  alpn_protocols,
uint16_t  num_alpn_protocols,
tsi_ssl_client_handshaker_factory **  factory 
)

Definition at line 1992 of file ssl_transport_security.cc.

◆ tsi_create_ssl_client_handshaker_factory_with_options()

tsi_result tsi_create_ssl_client_handshaker_factory_with_options ( const tsi_ssl_client_handshaker_options options,
tsi_ssl_client_handshaker_factory **  factory 
)

Definition at line 2007 of file ssl_transport_security.cc.

◆ tsi_create_ssl_server_handshaker_factory()

tsi_result tsi_create_ssl_server_handshaker_factory ( const tsi_ssl_pem_key_cert_pair pem_key_cert_pairs,
size_t  num_key_cert_pairs,
const char *  pem_client_root_certs,
int  force_client_auth,
const char *  cipher_suites,
const char **  alpn_protocols,
uint16_t  num_alpn_protocols,
tsi_ssl_server_handshaker_factory **  factory 
)

Definition at line 2148 of file ssl_transport_security.cc.

◆ tsi_create_ssl_server_handshaker_factory_ex()

tsi_result tsi_create_ssl_server_handshaker_factory_ex ( const tsi_ssl_pem_key_cert_pair pem_key_cert_pairs,
size_t  num_key_cert_pairs,
const char *  pem_client_root_certs,
tsi_client_certificate_request_type  client_certificate_request,
const char *  cipher_suites,
const char **  alpn_protocols,
uint16_t  num_alpn_protocols,
tsi_ssl_server_handshaker_factory **  factory 
)

Definition at line 2161 of file ssl_transport_security.cc.

◆ tsi_create_ssl_server_handshaker_factory_with_options()

tsi_result tsi_create_ssl_server_handshaker_factory_with_options ( const tsi_ssl_server_handshaker_options options,
tsi_ssl_server_handshaker_factory **  factory 
)

Definition at line 2179 of file ssl_transport_security.cc.

◆ tsi_ssl_client_handshaker_factory_create_handshaker()

tsi_result tsi_ssl_client_handshaker_factory_create_handshaker ( tsi_ssl_client_handshaker_factory factory,
const char *  server_name_indication,
size_t  network_bio_buf_size,
size_t  ssl_bio_buf_size,
tsi_handshaker **  handshaker 
)

Definition at line 1774 of file ssl_transport_security.cc.

◆ tsi_ssl_client_handshaker_factory_unref()

void tsi_ssl_client_handshaker_factory_unref ( tsi_ssl_client_handshaker_factory factory)

Definition at line 1783 of file ssl_transport_security.cc.

◆ tsi_ssl_extract_x509_subject_names_from_pem_cert()

tsi_result tsi_ssl_extract_x509_subject_names_from_pem_cert ( const char *  pem_cert,
tsi_peer peer 
)

Definition at line 877 of file ssl_transport_security.cc.

◆ tsi_ssl_get_cert_chain_contents()

tsi_result tsi_ssl_get_cert_chain_contents ( STACK_OF(X509) *  peer_chain,
tsi_peer_property property 
)

Definition at line 1246 of file ssl_transport_security.cc.

◆ tsi_ssl_handshaker_factory_swap_vtable()

const tsi_ssl_handshaker_factory_vtable* tsi_ssl_handshaker_factory_swap_vtable ( tsi_ssl_handshaker_factory factory,
tsi_ssl_handshaker_factory_vtable new_vtable 
)

Definition at line 2408 of file ssl_transport_security.cc.

◆ tsi_ssl_peer_matches_name()

int tsi_ssl_peer_matches_name ( const tsi_peer peer,
absl::string_view  name 
)

Definition at line 2368 of file ssl_transport_security.cc.

◆ tsi_ssl_root_certs_store_create()

tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create ( const char *  pem_roots)

Definition at line 1000 of file ssl_transport_security.cc.

◆ tsi_ssl_root_certs_store_destroy()

void tsi_ssl_root_certs_store_destroy ( tsi_ssl_root_certs_store self)

Definition at line 1029 of file ssl_transport_security.cc.

◆ tsi_ssl_server_handshaker_factory_create_handshaker()

tsi_result tsi_ssl_server_handshaker_factory_create_handshaker ( tsi_ssl_server_handshaker_factory factory,
size_t  network_bio_buf_size,
size_t  ssl_bio_buf_size,
tsi_handshaker **  handshaker 
)

Definition at line 1813 of file ssl_transport_security.cc.

◆ tsi_ssl_server_handshaker_factory_unref()

void tsi_ssl_server_handshaker_factory_unref ( tsi_ssl_server_handshaker_factory factory)

Definition at line 1824 of file ssl_transport_security.cc.

◆ tsi_ssl_session_cache_create_lru()

tsi_ssl_session_cache* tsi_ssl_session_cache_create_lru ( size_t  capacity)

Definition at line 1037 of file ssl_transport_security.cc.

◆ tsi_ssl_session_cache_ref()

void tsi_ssl_session_cache_ref ( tsi_ssl_session_cache cache)

Definition at line 1043 of file ssl_transport_security.cc.

◆ tsi_ssl_session_cache_unref()

void tsi_ssl_session_cache_unref ( tsi_ssl_session_cache cache)

Definition at line 1048 of file ssl_transport_security.cc.

◆ tsi_tls_session_key_logging_supported()

static constexpr bool tsi_tls_session_key_logging_supported ( )
staticconstexpr

Definition at line 83 of file ssl_transport_security.h.



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