Add ChaCha20/Poly1305 ciphers to the selftest program

This commit is contained in:
Daniel King 2016-05-18 10:09:28 -03:00 committed by Manuel Pégourié-Gonnard
parent d00afaf2ba
commit a7472e16bc

View File

@ -44,6 +44,9 @@
#include "mbedtls/des.h" #include "mbedtls/des.h"
#include "mbedtls/aes.h" #include "mbedtls/aes.h"
#include "mbedtls/camellia.h" #include "mbedtls/camellia.h"
#include "mbedtls/chacha20.h"
#include "mbedtls/poly1305.h"
#include "mbedtls/aead_chacha20_poly1305.h"
#include "mbedtls/base64.h" #include "mbedtls/base64.h"
#include "mbedtls/bignum.h" #include "mbedtls/bignum.h"
#include "mbedtls/rsa.h" #include "mbedtls/rsa.h"
@ -207,6 +210,15 @@ const selftest_t selftests[] =
#if defined(MBEDTLS_CMAC_C) #if defined(MBEDTLS_CMAC_C)
{"cmac", mbedtls_cmac_self_test}, {"cmac", mbedtls_cmac_self_test},
#endif #endif
#if defined(MBEDTLS_CHACHA20_C)
{"chacha20", mbedtls_chacha20_self_test},
#endif
#if defined(MBEDTLS_POLY1305_C)
{"poly1305", mbedtls_poly1305_self_test},
#endif
#if defined(MBEDTLS_AEAD_CHACHA20_POLY1305_C)
{"chacha20-poly1305", mbedtls_aead_chacha20_poly1305_self_test},
#endif
#if defined(MBEDTLS_BASE64_C) #if defined(MBEDTLS_BASE64_C)
{"base64", mbedtls_base64_self_test}, {"base64", mbedtls_base64_self_test},
#endif #endif