Namespaces | Macros | Functions | Variables
security_connector_test.cc File Reference
#include "src/core/lib/security/security_connector/security_connector.h"
#include <stdio.h>
#include <string.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/gpr/tmpfile.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/security/context/security_context.h"
#include "src/core/lib/security/security_connector/ssl_utils.h"
#include "src/core/lib/security/security_connector/ssl_utils_config.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/tsi/ssl_transport_security.h"
#include "src/core/tsi/transport_security.h"
#include "test/core/util/test_config.h"
Include dependency graph for security_connector_test.cc:

Go to the source code of this file.

Namespaces

 grpc_core
 

Macros

#define TSI_OPENSSL_ALPN_SUPPORT   1
 

Functions

static int check_peer_property (const tsi_peer *peer, const tsi_peer_property *expected)
 
static int check_properties (const grpc_auth_context *ctx, const char *expected_property_name, const std::vector< std::string > &expected_property_values)
 
static int check_property (const grpc_auth_context *ctx, const char *expected_property_name, const char *expected_property_value)
 
static int check_spiffe_id (const grpc_auth_context *ctx, const char *expected_spiffe_id, bool expect_spiffe_id)
 
static int check_ssl_peer_equivalence (const tsi_peer *original, const tsi_peer *reconstructed)
 
int main (int argc, char **argv)
 
static grpc_ssl_roots_override_result override_roots_permanent_failure (char **)
 
static grpc_ssl_roots_override_result override_roots_success (char **pem_root_certs)
 
static void test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context (void)
 
static void test_cn_and_multiple_sans_ssl_peer_to_auth_context (void)
 
static void test_cn_and_one_san_ssl_peer_to_auth_context (void)
 
static void test_cn_only_ssl_peer_to_auth_context (void)
 
static void test_default_ssl_roots (void)
 
static void test_dns_peer_to_auth_context (void)
 
static void test_email_peer_to_auth_context (void)
 
static void test_ip_peer_to_auth_context (void)
 
static void test_ipv6_address_san (void)
 
static void test_peer_alpn_check (void)
 
static void test_spiffe_id_peer_to_auth_context (void)
 
static void test_subject_to_auth_context (void)
 
static void test_unauthenticated_ssl_peer (void)
 
static void test_uri_peer_to_auth_context (void)
 

Variables

static const char * roots_for_override_api = "roots for override api"
 

Macro Definition Documentation

◆ TSI_OPENSSL_ALPN_SUPPORT

#define TSI_OPENSSL_ALPN_SUPPORT   1

Definition at line 41 of file security_connector_test.cc.

Function Documentation

◆ check_peer_property()

static int check_peer_property ( const tsi_peer peer,
const tsi_peer_property expected 
)
static

Definition at line 44 of file security_connector_test.cc.

◆ check_properties()

static int check_properties ( const grpc_auth_context ctx,
const char *  expected_property_name,
const std::vector< std::string > &  expected_property_values 
)
static

Definition at line 98 of file security_connector_test.cc.

◆ check_property()

static int check_property ( const grpc_auth_context ctx,
const char *  expected_property_name,
const char *  expected_property_value 
)
static

Definition at line 75 of file security_connector_test.cc.

◆ check_spiffe_id()

static int check_spiffe_id ( const grpc_auth_context ctx,
const char *  expected_spiffe_id,
bool  expect_spiffe_id 
)
static

Definition at line 129 of file security_connector_test.cc.

◆ check_ssl_peer_equivalence()

static int check_ssl_peer_equivalence ( const tsi_peer original,
const tsi_peer reconstructed 
)
static

Definition at line 59 of file security_connector_test.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 711 of file security_connector_test.cc.

◆ override_roots_permanent_failure()

static grpc_ssl_roots_override_result override_roots_permanent_failure ( char **  )
static

Definition at line 579 of file security_connector_test.cc.

◆ override_roots_success()

static grpc_ssl_roots_override_result override_roots_success ( char **  pem_root_certs)
static

Definition at line 573 of file security_connector_test.cc.

◆ test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context()

static void test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context ( void  )
static

Definition at line 341 of file security_connector_test.cc.

◆ test_cn_and_multiple_sans_ssl_peer_to_auth_context()

static void test_cn_and_multiple_sans_ssl_peer_to_auth_context ( void  )
static

Definition at line 286 of file security_connector_test.cc.

◆ test_cn_and_one_san_ssl_peer_to_auth_context()

static void test_cn_and_one_san_ssl_peer_to_auth_context ( void  )
static

Definition at line 232 of file security_connector_test.cc.

◆ test_cn_only_ssl_peer_to_auth_context()

static void test_cn_only_ssl_peer_to_auth_context ( void  )
static

Definition at line 185 of file security_connector_test.cc.

◆ test_default_ssl_roots()

static void test_default_ssl_roots ( void  )
static

Definition at line 620 of file security_connector_test.cc.

◆ test_dns_peer_to_auth_context()

static void test_dns_peer_to_auth_context ( void  )
static

Definition at line 401 of file security_connector_test.cc.

◆ test_email_peer_to_auth_context()

static void test_email_peer_to_auth_context ( void  )
static

Definition at line 437 of file security_connector_test.cc.

◆ test_ip_peer_to_auth_context()

static void test_ip_peer_to_auth_context ( void  )
static

Definition at line 455 of file security_connector_test.cc.

◆ test_ipv6_address_san()

static void test_ipv6_address_san ( void  )
static

Definition at line 584 of file security_connector_test.cc.

◆ test_peer_alpn_check()

static void test_peer_alpn_check ( void  )
static

Definition at line 674 of file security_connector_test.cc.

◆ test_spiffe_id_peer_to_auth_context()

static void test_spiffe_id_peer_to_auth_context ( void  )
static

Definition at line 474 of file security_connector_test.cc.

◆ test_subject_to_auth_context()

static void test_subject_to_auth_context ( void  )
static

Definition at line 555 of file security_connector_test.cc.

◆ test_unauthenticated_ssl_peer()

static void test_unauthenticated_ssl_peer ( void  )
static

Definition at line 158 of file security_connector_test.cc.

◆ test_uri_peer_to_auth_context()

static void test_uri_peer_to_auth_context ( void  )
static

Definition at line 419 of file security_connector_test.cc.

Variable Documentation

◆ roots_for_override_api

const char* roots_for_override_api = "roots for override api"
static

Definition at line 571 of file security_connector_test.cc.



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