Go to the documentation of this file.
60 for (
size_t i = 0;
i < slice_count;
i++) {
71 for (
size_t i = 0;
i < sb->
count;
i++) {
90 for (
size_t i = 0;
i <
first->length;
i++) {
95 if ((*first_ptr) != (*second_ptr)) {
128 crypter, 8,
true,
true,
135 crypter, 8,
true,
false,
142 crypter, 8,
false,
true,
149 crypter, 8,
false,
false,
186 crypter, 8,
true,
true,
193 crypter, 8,
true,
false,
200 crypter, 8,
false,
true,
207 crypter, 8,
false,
false,
261 if (var ==
nullptr) {
428 auto* fixture_1 = fixture_create();
432 auto* fixture_2 = fixture_create();
436 auto* fixture_3 = fixture_create();
440 auto* fixture_4 = fixture_create();
444 auto* fixture_5 = fixture_create();
449 int main(
int argc,
char** argv) {
static void create_random_slice_buffer(grpc_slice_buffer *sb)
uint32_t gsec_test_bias_random_uint32(uint32_t max_length)
static void alter_random_byte(grpc_slice_buffer *sb)
alts_grpc_record_protocol * server_protect
alts_grpc_record_protocol * client_unprotect
void alts_grpc_record_protocol_destroy(alts_grpc_record_protocol *self)
GPRAPI void gpr_free(void *ptr)
#define GRPC_SLICE_MALLOC(len)
constexpr size_t kTagLength
static void alts_grpc_record_protocol_corrupted_data_tests(alts_grpc_record_protocol_test_fixture *fixture)
void gsec_test_random_array(uint8_t **bytes, size_t length)
static alts_grpc_record_protocol_test_fixture * test_fixture_integrity_only_rekey_create()
static alts_grpc_record_protocol_test_fixture * test_fixture_integrity_only_create(bool rekey, bool extra_copy)
constexpr size_t kSealRepeatTimes
grpc_status_code gsec_aes_gcm_aead_crypter_create(const uint8_t *key, size_t key_length, size_t nonce_length, size_t tag_length, bool rekey, gsec_aead_crypter **crypter, char **error_details)
static void alts_grpc_record_protocol_tests(alts_grpc_record_protocol_test_fixture *(*fixture_create)())
constexpr size_t kMaxSliceLength
static void corrupted_data(alts_grpc_record_protocol *sender, alts_grpc_record_protocol *receiver)
static alts_grpc_record_protocol_test_fixture * test_fixture_privacy_integrity_no_rekey_create()
GPRAPI void * gpr_zalloc(size_t size)
tsi_result alts_grpc_integrity_only_record_protocol_create(gsec_aead_crypter *crypter, size_t overflow_size, bool is_client, bool is_protect, bool enable_extra_copy, alts_grpc_record_protocol **rp)
const size_t kAesGcmNonceLength
static alts_grpc_record_protocol_test_fixture * test_fixture_privacy_integrity_rekey_create()
static const char fixture[]
const size_t kAes128GcmRekeyKeyLength
static void unsync_seal_unseal(alts_grpc_record_protocol *sender, alts_grpc_record_protocol *receiver)
tsi_result alts_grpc_record_protocol_protect(alts_grpc_record_protocol *self, grpc_slice_buffer *unprotected_slices, grpc_slice_buffer *protected_slices)
#define GRPC_SLICE_START_PTR(slice)
size_t alts_iovec_record_protocol_get_header_length()
alts_grpc_record_protocol * client_protect
static void input_check(alts_grpc_record_protocol *rp)
static uint8_t * pointer_to_nth_byte(grpc_slice_buffer *sb, size_t index)
static void alts_grpc_record_protocol_unsync_seal_unseal_tests(alts_grpc_record_protocol_test_fixture *fixture)
grpc_slice_buffer protected_sb
GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer *sb)
static void alts_grpc_record_protocol_test_var_destroy(alts_grpc_record_protocol_test_var *var)
tsi_result alts_grpc_privacy_integrity_record_protocol_create(gsec_aead_crypter *crypter, size_t overflow_size, bool is_client, bool is_protect, alts_grpc_record_protocol **rp)
#define GRPC_SLICE_LENGTH(slice)
static void alts_grpc_record_protocol_random_seal_unseal_tests(alts_grpc_record_protocol_test_fixture *fixture)
GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice)
static void empty_seal_unseal(alts_grpc_record_protocol *sender, alts_grpc_record_protocol *receiver)
grpc_core::ExecCtx exec_ctx
static void alts_grpc_record_protocol_empty_seal_unseal_tests(alts_grpc_record_protocol_test_fixture *fixture)
alts_grpc_record_protocol * server_unprotect
static alts_grpc_record_protocol_test_fixture * test_fixture_integrity_only_extra_copy_create()
static alts_grpc_record_protocol_test_fixture * test_fixture_privacy_integrity_create(bool rekey)
grpc_slice_buffer unprotected_sb
GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst)
static void alts_grpc_record_protocol_test_fixture_destroy(alts_grpc_record_protocol_test_fixture *fixture)
grpc_slice_buffer original_sb
void grpc_slice_buffer_destroy_internal(grpc_slice_buffer *sb)
void gsec_test_random_bytes(uint8_t *bytes, size_t length)
GRPCAPI void grpc_init(void)
constexpr size_t kMaxSlices
static bool are_slice_buffers_equal(grpc_slice_buffer *first, grpc_slice_buffer *second)
const size_t kAes128GcmKeyLength
GRPCAPI void grpc_shutdown(void)
tsi_result alts_grpc_record_protocol_unprotect(alts_grpc_record_protocol *self, grpc_slice_buffer *protected_slices, grpc_slice_buffer *unprotected_slices)
static void alts_grpc_record_protocol_input_check_tests(alts_grpc_record_protocol_test_fixture *fixture)
void grpc_slice_buffer_reset_and_unref_internal(grpc_slice_buffer *sb)
grpc_slice_buffer duplicate_sb
int main(int argc, char **argv)
static alts_grpc_record_protocol_test_fixture * test_fixture_integrity_only_no_rekey_no_extra_copy_create()
const size_t kAesGcmTagLength
GPRAPI grpc_slice grpc_slice_ref(grpc_slice s)
static void random_seal_unseal(alts_grpc_record_protocol *sender, alts_grpc_record_protocol *receiver)
static alts_grpc_record_protocol_test_var * alts_grpc_record_protocol_test_var_create()
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:40