Classes | Macros | Typedefs | Functions | Variables
h2_tls.cc File Reference
#include <stdio.h>
#include <string.h>
#include "absl/container/inlined_vector.h"
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/gprpp/host_port.h"
#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#include "src/core/lib/security/security_connector/ssl_utils_config.h"
#include "test/core/end2end/end2end_tests.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
#include "test/core/util/tls_utils.h"
Include dependency graph for h2_tls.cc:

Go to the source code of this file.

Classes

struct  fullstack_secure_fixture_data
 
struct  SecurityPrimitives
 

Macros

#define CA_CERT_PATH   "src/core/tsi/test_creds/ca.pem"
 
#define SERVER_CERT_PATH   "src/core/tsi/test_creds/server1.pem"
 
#define SERVER_KEY_PATH   "src/core/tsi/test_creds/server1.key"
 

Typedefs

typedef absl::InlinedVector< grpc_core::Thread, 1 > ThreadList
 

Functions

static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier (const grpc_channel_args *, const grpc_channel_args *)
 
static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier_cert_watcher (const grpc_channel_args *, const grpc_channel_args *)
 
static grpc_end2end_test_fixture chttp2_create_fixture_hostname_verifier_cert_watcher (const grpc_channel_args *, const grpc_channel_args *)
 
static grpc_end2end_test_fixture chttp2_create_fixture_simple_fullstack (const grpc_channel_args *, const grpc_channel_args *)
 
static void chttp2_init_client (grpc_end2end_test_fixture *f, const grpc_channel_args *client_args)
 
static void chttp2_init_client_secure_fullstack (grpc_end2end_test_fixture *f, const grpc_channel_args *client_args, grpc_channel_credentials *creds)
 
static void chttp2_init_server (grpc_end2end_test_fixture *f, const grpc_channel_args *server_args)
 
static void chttp2_init_server_secure_fullstack (grpc_end2end_test_fixture *f, const grpc_channel_args *server_args, grpc_server_credentials *server_creds)
 
void chttp2_tear_down_secure_fullstack (grpc_end2end_test_fixture *f)
 
static grpc_channel_credentialscreate_tls_channel_credentials (fullstack_secure_fixture_data *ffd)
 
static grpc_server_credentialscreate_tls_server_credentials (fullstack_secure_fixture_data *ffd)
 
static int fail_server_auth_check (const grpc_channel_args *server_args)
 
int main (int argc, char **argv)
 
static void process_auth_failure (void *state, grpc_auth_context *, const grpc_metadata *, size_t, grpc_process_auth_metadata_done_cb cb, void *user_data)
 
static void SetCertificateProvider (fullstack_secure_fixture_data *ffd, SecurityPrimitives::ProviderType provider_type)
 
static void SetCertificateVerifier (fullstack_secure_fixture_data *ffd, SecurityPrimitives::VerifierType verifier_type)
 
static void SetTlsVersion (fullstack_secure_fixture_data *ffd, SecurityPrimitives::TlsVersion tls_version)
 

Variables

static grpc_end2end_test_config configs []
 
static const uint32_t kH2TLSFeatureMask
 

Macro Definition Documentation

◆ CA_CERT_PATH

#define CA_CERT_PATH   "src/core/tsi/test_creds/ca.pem"

Definition at line 45 of file h2_tls.cc.

◆ SERVER_CERT_PATH

#define SERVER_CERT_PATH   "src/core/tsi/test_creds/server1.pem"

Definition at line 46 of file h2_tls.cc.

◆ SERVER_KEY_PATH

#define SERVER_KEY_PATH   "src/core/tsi/test_creds/server1.key"

Definition at line 47 of file h2_tls.cc.

Typedef Documentation

◆ ThreadList

Definition at line 49 of file h2_tls.cc.

Function Documentation

◆ chttp2_create_fixture_async_verifier()

static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier ( const grpc_channel_args ,
const grpc_channel_args  
)
static

Definition at line 192 of file h2_tls.cc.

◆ chttp2_create_fixture_async_verifier_cert_watcher()

static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier_cert_watcher ( const grpc_channel_args ,
const grpc_channel_args  
)
static

Definition at line 227 of file h2_tls.cc.

◆ chttp2_create_fixture_hostname_verifier_cert_watcher()

static grpc_end2end_test_fixture chttp2_create_fixture_hostname_verifier_cert_watcher ( const grpc_channel_args ,
const grpc_channel_args  
)
static

Definition at line 210 of file h2_tls.cc.

◆ chttp2_create_fixture_simple_fullstack()

static grpc_end2end_test_fixture chttp2_create_fixture_simple_fullstack ( const grpc_channel_args ,
const grpc_channel_args  
)
static

Definition at line 175 of file h2_tls.cc.

◆ chttp2_init_client()

static void chttp2_init_client ( grpc_end2end_test_fixture f,
const grpc_channel_args client_args 
)
static

Definition at line 328 of file h2_tls.cc.

◆ chttp2_init_client_secure_fullstack()

static void chttp2_init_client_secure_fullstack ( grpc_end2end_test_fixture f,
const grpc_channel_args client_args,
grpc_channel_credentials creds 
)
static

Definition at line 252 of file h2_tls.cc.

◆ chttp2_init_server()

static void chttp2_init_server ( grpc_end2end_test_fixture f,
const grpc_channel_args server_args 
)
static

Definition at line 354 of file h2_tls.cc.

◆ chttp2_init_server_secure_fullstack()

static void chttp2_init_server_secure_fullstack ( grpc_end2end_test_fixture f,
const grpc_channel_args server_args,
grpc_server_credentials server_creds 
)
static

Definition at line 262 of file h2_tls.cc.

◆ chttp2_tear_down_secure_fullstack()

void chttp2_tear_down_secure_fullstack ( grpc_end2end_test_fixture f)

Definition at line 278 of file h2_tls.cc.

◆ create_tls_channel_credentials()

static grpc_channel_credentials* create_tls_channel_credentials ( fullstack_secure_fixture_data ffd)
static

Definition at line 285 of file h2_tls.cc.

◆ create_tls_server_credentials()

static grpc_server_credentials* create_tls_server_credentials ( fullstack_secure_fixture_data ffd)
static

Definition at line 308 of file h2_tls.cc.

◆ fail_server_auth_check()

static int fail_server_auth_check ( const grpc_channel_args server_args)
static

Definition at line 342 of file h2_tls.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 399 of file h2_tls.cc.

◆ process_auth_failure()

static void process_auth_failure ( void *  state,
grpc_auth_context ,
const grpc_metadata ,
size_t  ,
grpc_process_auth_metadata_done_cb  cb,
void *  user_data 
)
static

Definition at line 243 of file h2_tls.cc.

◆ SetCertificateProvider()

static void SetCertificateProvider ( fullstack_secure_fixture_data ffd,
SecurityPrimitives::ProviderType  provider_type 
)
static

Definition at line 91 of file h2_tls.cc.

◆ SetCertificateVerifier()

static void SetCertificateVerifier ( fullstack_secure_fixture_data ffd,
SecurityPrimitives::VerifierType  verifier_type 
)
static

Definition at line 134 of file h2_tls.cc.

◆ SetTlsVersion()

static void SetTlsVersion ( fullstack_secure_fixture_data ffd,
SecurityPrimitives::TlsVersion  tls_version 
)
static

Definition at line 77 of file h2_tls.cc.

Variable Documentation

◆ configs

grpc_end2end_test_config configs[]
static
Initial value:

Definition at line 372 of file h2_tls.cc.

◆ kH2TLSFeatureMask

const uint32_t kH2TLSFeatureMask
static
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER
#define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER
Definition: end2end_tests.h:38
kH2TLSFeatureMask
static const uint32_t kH2TLSFeatureMask
Definition: h2_tls.cc:366
chttp2_create_fixture_hostname_verifier_cert_watcher
static grpc_end2end_test_fixture chttp2_create_fixture_hostname_verifier_cert_watcher(const grpc_channel_args *, const grpc_channel_args *)
Definition: h2_tls.cc:210
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS
Definition: end2end_tests.h:32
chttp2_init_client
static void chttp2_init_client(grpc_end2end_test_fixture *f, const grpc_channel_args *client_args)
Definition: h2_tls.cc:328
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION
#define FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION
Definition: end2end_tests.h:28
chttp2_create_fixture_simple_fullstack
static grpc_end2end_test_fixture chttp2_create_fixture_simple_fullstack(const grpc_channel_args *, const grpc_channel_args *)
Definition: h2_tls.cc:175
chttp2_create_fixture_async_verifier_cert_watcher
static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier_cert_watcher(const grpc_channel_args *, const grpc_channel_args *)
Definition: h2_tls.cc:227
chttp2_tear_down_secure_fullstack
void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f)
Definition: h2_tls.cc:278
chttp2_init_server
static void chttp2_init_server(grpc_end2end_test_fixture *f, const grpc_channel_args *server_args)
Definition: h2_tls.cc:354
chttp2_create_fixture_async_verifier
static grpc_end2end_test_fixture chttp2_create_fixture_async_verifier(const grpc_channel_args *, const grpc_channel_args *)
Definition: h2_tls.cc:192
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL
#define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL
Definition: end2end_tests.h:37


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