Classes | Functions | Variables
alts_zero_copy_grpc_protector_test.cc File Reference
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h"
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/tsi/alts/crypt/gsec.h"
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h"
#include "src/core/tsi/transport_security_grpc.h"
#include "test/core/tsi/alts/crypt/gsec_test_util.h"
#include "test/core/util/test_config.h"
Include dependency graph for alts_zero_copy_grpc_protector_test.cc:

Go to the source code of this file.

Classes

struct  alts_zero_copy_grpc_protector_test_fixture
 
struct  alts_zero_copy_grpc_protector_test_var
 

Functions

static alts_zero_copy_grpc_protector_test_fixturealts_zero_copy_grpc_protector_test_fixture_create (bool rekey, bool integrity_only, bool enable_extra_copy)
 
static void alts_zero_copy_grpc_protector_test_fixture_destroy (alts_zero_copy_grpc_protector_test_fixture *fixture)
 
static alts_zero_copy_grpc_protector_test_varalts_zero_copy_grpc_protector_test_var_create ()
 
static void alts_zero_copy_grpc_protector_test_var_destroy (alts_zero_copy_grpc_protector_test_var *var)
 
static void alts_zero_copy_protector_seal_unseal_large_buffer_tests (bool enable_extra_copy)
 
static void alts_zero_copy_protector_seal_unseal_small_buffer_tests (bool enable_extra_copy)
 
static bool are_slice_buffers_equal (grpc_slice_buffer *first, grpc_slice_buffer *second)
 
static void create_random_slice_buffer (grpc_slice_buffer *sb, grpc_slice_buffer *dup_sb, size_t length)
 
int main (int argc, char **argv)
 
static uint8_tpointer_to_nth_byte (grpc_slice_buffer *sb, size_t index)
 
static void seal_unseal_large_buffer (tsi_zero_copy_grpc_protector *sender, tsi_zero_copy_grpc_protector *receiver)
 
static void seal_unseal_small_buffer (tsi_zero_copy_grpc_protector *sender, tsi_zero_copy_grpc_protector *receiver)
 

Variables

constexpr size_t kChannelMaxSize = 2048
 
constexpr size_t kChannelMinSize = 128
 
constexpr size_t kLargeBufferSize = 16384
 
constexpr size_t kSealRepeatTimes = 50
 
constexpr size_t kSmallBufferSize = 16
 

Function Documentation

◆ alts_zero_copy_grpc_protector_test_fixture_create()

static alts_zero_copy_grpc_protector_test_fixture* alts_zero_copy_grpc_protector_test_fixture_create ( bool  rekey,
bool  integrity_only,
bool  enable_extra_copy 
)
static

Definition at line 105 of file alts_zero_copy_grpc_protector_test.cc.

◆ alts_zero_copy_grpc_protector_test_fixture_destroy()

static void alts_zero_copy_grpc_protector_test_fixture_destroy ( alts_zero_copy_grpc_protector_test_fixture fixture)
static

Definition at line 136 of file alts_zero_copy_grpc_protector_test.cc.

◆ alts_zero_copy_grpc_protector_test_var_create()

static alts_zero_copy_grpc_protector_test_var* alts_zero_copy_grpc_protector_test_var_create ( )
static

Definition at line 149 of file alts_zero_copy_grpc_protector_test.cc.

◆ alts_zero_copy_grpc_protector_test_var_destroy()

static void alts_zero_copy_grpc_protector_test_var_destroy ( alts_zero_copy_grpc_protector_test_var var)
static

Definition at line 161 of file alts_zero_copy_grpc_protector_test.cc.

◆ alts_zero_copy_protector_seal_unseal_large_buffer_tests()

static void alts_zero_copy_protector_seal_unseal_large_buffer_tests ( bool  enable_extra_copy)
static

Definition at line 282 of file alts_zero_copy_grpc_protector_test.cc.

◆ alts_zero_copy_protector_seal_unseal_small_buffer_tests()

static void alts_zero_copy_protector_seal_unseal_small_buffer_tests ( bool  enable_extra_copy)
static

Definition at line 254 of file alts_zero_copy_grpc_protector_test.cc.

◆ are_slice_buffers_equal()

static bool are_slice_buffers_equal ( grpc_slice_buffer first,
grpc_slice_buffer second 
)
static

Definition at line 86 of file alts_zero_copy_grpc_protector_test.cc.

◆ create_random_slice_buffer()

static void create_random_slice_buffer ( grpc_slice_buffer sb,
grpc_slice_buffer dup_sb,
size_t  length 
)
static

Definition at line 59 of file alts_zero_copy_grpc_protector_test.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 310 of file alts_zero_copy_grpc_protector_test.cc.

◆ pointer_to_nth_byte()

static uint8_t* pointer_to_nth_byte ( grpc_slice_buffer sb,
size_t  index 
)
static

Definition at line 71 of file alts_zero_copy_grpc_protector_test.cc.

◆ seal_unseal_large_buffer()

static void seal_unseal_large_buffer ( tsi_zero_copy_grpc_protector sender,
tsi_zero_copy_grpc_protector receiver 
)
static

Definition at line 218 of file alts_zero_copy_grpc_protector_test.cc.

◆ seal_unseal_small_buffer()

static void seal_unseal_small_buffer ( tsi_zero_copy_grpc_protector sender,
tsi_zero_copy_grpc_protector receiver 
)
static

Definition at line 176 of file alts_zero_copy_grpc_protector_test.cc.

Variable Documentation

◆ kChannelMaxSize

constexpr size_t kChannelMaxSize = 2048
constexpr

Definition at line 39 of file alts_zero_copy_grpc_protector_test.cc.

◆ kChannelMinSize

constexpr size_t kChannelMinSize = 128
constexpr

Definition at line 40 of file alts_zero_copy_grpc_protector_test.cc.

◆ kLargeBufferSize

constexpr size_t kLargeBufferSize = 16384
constexpr

Definition at line 38 of file alts_zero_copy_grpc_protector_test.cc.

◆ kSealRepeatTimes

constexpr size_t kSealRepeatTimes = 50
constexpr

Definition at line 36 of file alts_zero_copy_grpc_protector_test.cc.

◆ kSmallBufferSize

constexpr size_t kSmallBufferSize = 16
constexpr

Definition at line 37 of file alts_zero_copy_grpc_protector_test.cc.



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