GRPC Core  9.0.0
Data Structures | Macros | Typedefs | Functions
ssl_transport_security.h File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/string_view.h"
#include "src/core/tsi/transport_security_interface.h"

Go to the source code of this file.

Data Structures

struct  tsi_ssl_pem_key_cert_pair
 
struct  tsi_ssl_client_handshaker_options
 
struct  tsi_ssl_server_handshaker_options
 
struct  tsi_ssl_handshaker_factory_vtable
 

Macros

#define TSI_X509_CERTIFICATE_TYPE   "X509"
 
#define TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY   "x509_subject_common_name"
 
#define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY   "x509_subject_alternative_name"
 
#define TSI_SSL_SESSION_REUSED_PEER_PROPERTY   "ssl_session_reused"
 
#define TSI_X509_PEM_CERT_PROPERTY   "x509_pem_cert"
 
#define TSI_SSL_ALPN_SELECTED_PROTOCOL   "ssl_alpn_selected_protocol"
 

Typedefs

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

Functions

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_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)
 
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_ssl_client_handshaker_factory_create_handshaker (tsi_ssl_client_handshaker_factory *self, const char *server_name_indication, tsi_handshaker **handshaker)
 
void tsi_ssl_client_handshaker_factory_unref (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_server_handshaker_factory_create_handshaker (tsi_ssl_server_handshaker_factory *self, tsi_handshaker **handshaker)
 
void tsi_ssl_server_handshaker_factory_unref (tsi_ssl_server_handshaker_factory *self)
 
int tsi_ssl_peer_matches_name (const tsi_peer *peer, grpc_core::StringView name)
 
const tsi_ssl_handshaker_factory_vtabletsi_ssl_handshaker_factory_swap_vtable (tsi_ssl_handshaker_factory *factory, tsi_ssl_handshaker_factory_vtable *new_vtable)
 
tsi_result tsi_ssl_extract_x509_subject_names_from_pem_cert (const char *pem_cert, tsi_peer *peer)
 

Macro Definition Documentation

◆ TSI_SSL_ALPN_SELECTED_PROTOCOL

#define TSI_SSL_ALPN_SELECTED_PROTOCOL   "ssl_alpn_selected_protocol"

◆ TSI_SSL_SESSION_REUSED_PEER_PROPERTY

#define TSI_SSL_SESSION_REUSED_PEER_PROPERTY   "ssl_session_reused"

◆ TSI_X509_CERTIFICATE_TYPE

#define TSI_X509_CERTIFICATE_TYPE   "X509"

◆ TSI_X509_PEM_CERT_PROPERTY

#define TSI_X509_PEM_CERT_PROPERTY   "x509_pem_cert"

◆ TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY

#define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY   "x509_subject_alternative_name"

◆ TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY

#define TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY   "x509_subject_common_name"

Typedef Documentation

◆ tsi_ssl_client_handshaker_factory

◆ tsi_ssl_handshaker_factory

◆ tsi_ssl_handshaker_factory_destructor

typedef void(* tsi_ssl_handshaker_factory_destructor) (tsi_ssl_handshaker_factory *factory)

◆ tsi_ssl_root_certs_store

◆ tsi_ssl_server_handshaker_factory

◆ tsi_ssl_session_cache

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 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ 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 
)

◆ tsi_ssl_client_handshaker_factory_create_handshaker()

tsi_result tsi_ssl_client_handshaker_factory_create_handshaker ( tsi_ssl_client_handshaker_factory self,
const char *  server_name_indication,
tsi_handshaker **  handshaker 
)

◆ tsi_ssl_client_handshaker_factory_unref()

void tsi_ssl_client_handshaker_factory_unref ( tsi_ssl_client_handshaker_factory factory)

◆ 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 
)

◆ 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 
)

◆ tsi_ssl_peer_matches_name()

int tsi_ssl_peer_matches_name ( const tsi_peer peer,
grpc_core::StringView  name 
)

◆ tsi_ssl_root_certs_store_create()

tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create ( const char *  pem_roots)

◆ tsi_ssl_root_certs_store_destroy()

void tsi_ssl_root_certs_store_destroy ( tsi_ssl_root_certs_store self)

◆ tsi_ssl_server_handshaker_factory_create_handshaker()

tsi_result tsi_ssl_server_handshaker_factory_create_handshaker ( tsi_ssl_server_handshaker_factory self,
tsi_handshaker **  handshaker 
)

◆ tsi_ssl_server_handshaker_factory_unref()

void tsi_ssl_server_handshaker_factory_unref ( tsi_ssl_server_handshaker_factory self)

◆ tsi_ssl_session_cache_create_lru()

tsi_ssl_session_cache* tsi_ssl_session_cache_create_lru ( size_t  capacity)

◆ tsi_ssl_session_cache_ref()

void tsi_ssl_session_cache_ref ( tsi_ssl_session_cache cache)

◆ tsi_ssl_session_cache_unref()

void tsi_ssl_session_cache_unref ( tsi_ssl_session_cache cache)