Go to the documentation of this file.
54 #include <gtest/gtest.h>
76 #if defined(OPENSSL_64_BIT)
91 0, 1, -1, 1024, -1024, 12345, -12345,
92 32000, -32000, INT_MAX, INT_MIN, INT_MAX - 1, INT_MIN + 1};
141 TEST(ConstantTimeTest, MemCmp) {
148 for (
size_t i = 0;
i <
sizeof(
buf);
i++) {
149 for (
uint8_t bit = 1; bit != 0; bit <<= 1) {
157 TEST(ConstantTimeTest, ValueBarrier) {
158 for (
int i = 0;
i < 10;
i++) {
static uint32_t value_barrier_u32(uint32_t a)
static crypto_word_t FromBoolW(bool b)
static int signed_test_values[]
static const uint8_t test_values_8[]
static int copy(grpc_slice_buffer *input, grpc_slice_buffer *output)
static crypto_word_t constant_time_is_zero_w(crypto_word_t a)
static crypto_word_t constant_time_ge_w(crypto_word_t a, crypto_word_t b)
static uint8_t constant_time_lt_8(crypto_word_t a, crypto_word_t b)
#define SCOPED_TRACE(message)
#define CONSTTIME_FALSE_W
static int constant_time_select_int(crypto_word_t mask, int a, int b)
#define EXPECT_NE(val1, val2)
unsigned __int64 uint64_t
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
static crypto_word_t test_values_w[]
TEST(ConstantTimeTest, Test)
static uint8_t constant_time_eq_int_8(int a, int b)
static uint8_t constant_time_ge_8(crypto_word_t a, crypto_word_t b)
static uint8_t constant_time_eq_8(crypto_word_t a, crypto_word_t b)
static crypto_word_t value_barrier_w(crypto_word_t a)
static uint8_t FromBool8(bool b)
static uint64_t value_barrier_u64(uint64_t a)
#define CONSTTIME_FALSE_8
static crypto_word_t constant_time_eq_int(int a, int b)
static crypto_word_t constant_time_select_w(crypto_word_t mask, crypto_word_t a, crypto_word_t b)
static uint8_t constant_time_is_zero_8(crypto_word_t a)
static uint8_t constant_time_select_8(uint8_t mask, uint8_t a, uint8_t b)
static crypto_word_t constant_time_eq_w(crypto_word_t a, crypto_word_t b)
static crypto_word_t constant_time_lt_w(crypto_word_t a, crypto_word_t b)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:01