Lines Matching refs:tls12

47 				 struct tls_crypto_info_keys *tls12)  in tls_crypto_info_init()  argument
49 memset(tls12, 0, sizeof(*tls12)); in tls_crypto_info_init()
53 tls12->len = sizeof(struct tls12_crypto_info_chacha20_poly1305); in tls_crypto_info_init()
54 tls12->chacha20.info.version = tls_version; in tls_crypto_info_init()
55 tls12->chacha20.info.cipher_type = cipher_type; in tls_crypto_info_init()
58 tls12->len = sizeof(struct tls12_crypto_info_aes_gcm_128); in tls_crypto_info_init()
59 tls12->aes128.info.version = tls_version; in tls_crypto_info_init()
60 tls12->aes128.info.cipher_type = cipher_type; in tls_crypto_info_init()
63 tls12->len = sizeof(struct tls12_crypto_info_sm4_gcm); in tls_crypto_info_init()
64 tls12->sm4gcm.info.version = tls_version; in tls_crypto_info_init()
65 tls12->sm4gcm.info.cipher_type = cipher_type; in tls_crypto_info_init()
68 tls12->len = sizeof(struct tls12_crypto_info_sm4_ccm); in tls_crypto_info_init()
69 tls12->sm4ccm.info.version = tls_version; in tls_crypto_info_init()
70 tls12->sm4ccm.info.cipher_type = cipher_type; in tls_crypto_info_init()
73 tls12->len = sizeof(struct tls12_crypto_info_aes_ccm_128); in tls_crypto_info_init()
74 tls12->aesccm128.info.version = tls_version; in tls_crypto_info_init()
75 tls12->aesccm128.info.cipher_type = cipher_type; in tls_crypto_info_init()
78 tls12->len = sizeof(struct tls12_crypto_info_aes_gcm_256); in tls_crypto_info_init()
79 tls12->aesgcm256.info.version = tls_version; in tls_crypto_info_init()
80 tls12->aesgcm256.info.cipher_type = cipher_type; in tls_crypto_info_init()
83 tls12->len = sizeof(struct tls12_crypto_info_aria_gcm_128); in tls_crypto_info_init()
84 tls12->ariagcm128.info.version = tls_version; in tls_crypto_info_init()
85 tls12->ariagcm128.info.cipher_type = cipher_type; in tls_crypto_info_init()
88 tls12->len = sizeof(struct tls12_crypto_info_aria_gcm_256); in tls_crypto_info_init()
89 tls12->ariagcm256.info.version = tls_version; in tls_crypto_info_init()
90 tls12->ariagcm256.info.cipher_type = cipher_type; in tls_crypto_info_init()
246 struct tls_crypto_info_keys tls12; in TEST_F() local
248 tls12.crypto_info.version = 200; in TEST_F()
249 tls12.crypto_info.cipher_type = TLS_CIPHER_AES_GCM_128; in TEST_F()
250 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
252 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
253 tls12.crypto_info.cipher_type = 50; in TEST_F()
254 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
256 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
257 tls12.crypto_info.cipher_type = 59; in TEST_F()
258 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
260 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
261 tls12.crypto_info.cipher_type = 10; in TEST_F()
262 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
264 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
265 tls12.crypto_info.cipher_type = 70; in TEST_F()
266 …EXPECT_EQ(setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, sizeof(struct tls12_crypto_info_aes_gcm_12… in TEST_F()
367 struct tls_crypto_info_keys tls12; in FIXTURE_SETUP() local
375 &tls12); in FIXTURE_SETUP()
382 ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, tls12.len); in FIXTURE_SETUP()
385 ret = setsockopt(self->cfd, SOL_TLS, TLS_RX, &tls12, tls12.len); in FIXTURE_SETUP()
1142 struct tls_crypto_info_keys tls12; in TEST_F() local
1145 &tls12); in TEST_F()
1147 ret = setsockopt(self->fd, SOL_TLS, TLS_RX, &tls12, in TEST_F()
1148 tls12.len); in TEST_F()
1151 ret = setsockopt(self->cfd, SOL_TLS, TLS_TX, &tls12, in TEST_F()
1152 tls12.len); in TEST_F()
1583 struct tls_crypto_info_keys tls12; in FIXTURE_SETUP() local
1587 &tls12); in FIXTURE_SETUP()
1594 ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, tls12.len); in FIXTURE_SETUP()
1597 ret = setsockopt(self->cfd2, SOL_TLS, TLS_RX, &tls12, tls12.len); in FIXTURE_SETUP()
1876 struct tls12_crypto_info_aes_gcm_256 tls12; in TEST() local
1883 memset(&tls12, 0, sizeof(tls12)); in TEST()
1884 tls12.info.version = TLS_1_2_VERSION; in TEST()
1885 tls12.info.cipher_type = TLS_CIPHER_AES_GCM_256; in TEST()
1928 struct tls12_crypto_info_aes_gcm_256 tls12; in TEST() local
1932 memset(&tls12, 0, sizeof(tls12)); in TEST()
1933 tls12.info.version = TLS_1_2_VERSION; in TEST()
1934 tls12.info.cipher_type = TLS_CIPHER_AES_GCM_256; in TEST()
1939 ret = setsockopt(fd, SOL_TLS, TLS_TX, &tls12, in TEST()
1940 sizeof(tls12)); in TEST()
1943 ret = setsockopt(cfd, SOL_TLS, TLS_RX, &tls12, in TEST()
1944 sizeof(tls12)); in TEST()
1953 struct tls12_crypto_info_aes_gcm_256 tls12; in TEST() local
1958 memset(&tls12, 0, sizeof(tls12)); in TEST()
1959 tls12.info.version = TLS_1_3_VERSION; in TEST()
1960 tls12.info.cipher_type = TLS_CIPHER_AES_GCM_256; in TEST()
1967 ret = setsockopt(fd, SOL_TLS, TLS_TX, &tls12, sizeof(tls12)); in TEST()
1970 ret = setsockopt(cfd, SOL_TLS, TLS_RX, &tls12, sizeof(tls12)); in TEST()
2004 struct tls_crypto_info_keys tls12; in TEST() local
2009 tls_crypto_info_init(TLS_1_2_VERSION, TLS_CIPHER_AES_GCM_128, &tls12); in TEST()
2041 ret = setsockopt(fd, SOL_TLS, TLS_TX, &tls12, tls12.len); in TEST()
2044 ret = setsockopt(fd, SOL_TLS, TLS_RX, &tls12, tls12.len); in TEST()
2059 struct tls_crypto_info_keys tls12; in TEST() local
2068 tls_crypto_info_init(TLS_1_2_VERSION, TLS_CIPHER_AES_GCM_256, &tls12); in TEST()
2090 ASSERT_EQ(setsockopt(fd, SOL_TLS, TLS_TX, &tls12, tls12.len), 0); in TEST()
2094 ASSERT_EQ(setsockopt(cfd, SOL_TLS, TLS_RX, &tls12, tls12.len), 0); in TEST()