mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
d17b9737c2
commit
d76c51f976
1 changed files with 18 additions and 0 deletions
|
@ -31,6 +31,7 @@ struct tls_crypto_info_keys {
|
||||||
struct tls12_crypto_info_chacha20_poly1305 chacha20;
|
struct tls12_crypto_info_chacha20_poly1305 chacha20;
|
||||||
struct tls12_crypto_info_sm4_gcm sm4gcm;
|
struct tls12_crypto_info_sm4_gcm sm4gcm;
|
||||||
struct tls12_crypto_info_sm4_ccm sm4ccm;
|
struct tls12_crypto_info_sm4_ccm sm4ccm;
|
||||||
|
struct tls12_crypto_info_aes_ccm_128 aesccm128;
|
||||||
};
|
};
|
||||||
size_t len;
|
size_t len;
|
||||||
};
|
};
|
||||||
|
@ -61,6 +62,11 @@ static void tls_crypto_info_init(uint16_t tls_version, uint16_t cipher_type,
|
||||||
tls12->sm4ccm.info.version = tls_version;
|
tls12->sm4ccm.info.version = tls_version;
|
||||||
tls12->sm4ccm.info.cipher_type = cipher_type;
|
tls12->sm4ccm.info.cipher_type = cipher_type;
|
||||||
break;
|
break;
|
||||||
|
case TLS_CIPHER_AES_CCM_128:
|
||||||
|
tls12->len = sizeof(struct tls12_crypto_info_aes_ccm_128);
|
||||||
|
tls12->aesccm128.info.version = tls_version;
|
||||||
|
tls12->aesccm128.info.cipher_type = cipher_type;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -261,6 +267,18 @@ FIXTURE_VARIANT_ADD(tls, 13_sm4_ccm)
|
||||||
.cipher_type = TLS_CIPHER_SM4_CCM,
|
.cipher_type = TLS_CIPHER_SM4_CCM,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
FIXTURE_VARIANT_ADD(tls, 12_aes_ccm)
|
||||||
|
{
|
||||||
|
.tls_version = TLS_1_2_VERSION,
|
||||||
|
.cipher_type = TLS_CIPHER_AES_CCM_128,
|
||||||
|
};
|
||||||
|
|
||||||
|
FIXTURE_VARIANT_ADD(tls, 13_aes_ccm)
|
||||||
|
{
|
||||||
|
.tls_version = TLS_1_3_VERSION,
|
||||||
|
.cipher_type = TLS_CIPHER_AES_CCM_128,
|
||||||
|
};
|
||||||
|
|
||||||
FIXTURE_SETUP(tls)
|
FIXTURE_SETUP(tls)
|
||||||
{
|
{
|
||||||
struct tls_crypto_info_keys tls12;
|
struct tls_crypto_info_keys tls12;
|
||||||
|
|
Loading…
Add table
Reference in a new issue