Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: tls: add missing AES-CCM cipher tests

Add tests for TLSv1.2 and TLSv1.3 with AES-CCM cipher.

Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vadim Fedorenko and committed by
Jakub Kicinski
d76c51f9 d17b9737

+18
+18
tools/testing/selftests/net/tls.c
··· 31 31 struct tls12_crypto_info_chacha20_poly1305 chacha20; 32 32 struct tls12_crypto_info_sm4_gcm sm4gcm; 33 33 struct tls12_crypto_info_sm4_ccm sm4ccm; 34 + struct tls12_crypto_info_aes_ccm_128 aesccm128; 34 35 }; 35 36 size_t len; 36 37 }; ··· 61 60 tls12->len = sizeof(struct tls12_crypto_info_sm4_ccm); 62 61 tls12->sm4ccm.info.version = tls_version; 63 62 tls12->sm4ccm.info.cipher_type = cipher_type; 63 + break; 64 + case TLS_CIPHER_AES_CCM_128: 65 + tls12->len = sizeof(struct tls12_crypto_info_aes_ccm_128); 66 + tls12->aesccm128.info.version = tls_version; 67 + tls12->aesccm128.info.cipher_type = cipher_type; 64 68 break; 65 69 default: 66 70 break; ··· 265 259 { 266 260 .tls_version = TLS_1_3_VERSION, 267 261 .cipher_type = TLS_CIPHER_SM4_CCM, 262 + }; 263 + 264 + FIXTURE_VARIANT_ADD(tls, 12_aes_ccm) 265 + { 266 + .tls_version = TLS_1_2_VERSION, 267 + .cipher_type = TLS_CIPHER_AES_CCM_128, 268 + }; 269 + 270 + FIXTURE_VARIANT_ADD(tls, 13_aes_ccm) 271 + { 272 + .tls_version = TLS_1_3_VERSION, 273 + .cipher_type = TLS_CIPHER_AES_CCM_128, 268 274 }; 269 275 270 276 FIXTURE_SETUP(tls)