From 2e495c73d691391c763b79d11ad3c74504a85519 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 16 Feb 2019 17:19:46 +0100 Subject: Bump mbedTLS to version 2.16 (LTS version) --- thirdparty/mbedtls/include/mbedtls/aes.h | 76 +- thirdparty/mbedtls/include/mbedtls/aesni.h | 46 +- thirdparty/mbedtls/include/mbedtls/arc4.h | 3 +- thirdparty/mbedtls/include/mbedtls/aria.h | 105 +- thirdparty/mbedtls/include/mbedtls/asn1write.h | 310 ++- thirdparty/mbedtls/include/mbedtls/bignum.h | 807 ++++--- thirdparty/mbedtls/include/mbedtls/blowfish.h | 143 +- thirdparty/mbedtls/include/mbedtls/bn_mul.h | 44 +- thirdparty/mbedtls/include/mbedtls/camellia.h | 219 +- thirdparty/mbedtls/include/mbedtls/ccm.h | 115 +- thirdparty/mbedtls/include/mbedtls/chacha20.h | 56 +- thirdparty/mbedtls/include/mbedtls/chachapoly.h | 85 +- thirdparty/mbedtls/include/mbedtls/check_config.h | 15 + thirdparty/mbedtls/include/mbedtls/cipher.h | 237 +- thirdparty/mbedtls/include/mbedtls/cmac.h | 1 + thirdparty/mbedtls/include/mbedtls/config.h | 250 ++- thirdparty/mbedtls/include/mbedtls/ctr_drbg.h | 66 +- thirdparty/mbedtls/include/mbedtls/debug.h | 36 + thirdparty/mbedtls/include/mbedtls/des.h | 6 +- thirdparty/mbedtls/include/mbedtls/dhm.h | 172 +- thirdparty/mbedtls/include/mbedtls/ecdh.h | 288 ++- thirdparty/mbedtls/include/mbedtls/ecdsa.h | 326 ++- thirdparty/mbedtls/include/mbedtls/ecjpake.h | 145 +- thirdparty/mbedtls/include/mbedtls/ecp.h | 590 ++++- thirdparty/mbedtls/include/mbedtls/entropy.h | 4 +- thirdparty/mbedtls/include/mbedtls/error.h | 13 +- thirdparty/mbedtls/include/mbedtls/gcm.h | 100 +- thirdparty/mbedtls/include/mbedtls/havege.h | 2 +- thirdparty/mbedtls/include/mbedtls/hkdf.h | 14 +- thirdparty/mbedtls/include/mbedtls/hmac_drbg.h | 32 +- thirdparty/mbedtls/include/mbedtls/md.h | 5 +- thirdparty/mbedtls/include/mbedtls/md2.h | 3 +- thirdparty/mbedtls/include/mbedtls/md4.h | 3 +- thirdparty/mbedtls/include/mbedtls/md5.h | 3 +- thirdparty/mbedtls/include/mbedtls/net_sockets.h | 2 +- thirdparty/mbedtls/include/mbedtls/oid.h | 3 +- thirdparty/mbedtls/include/mbedtls/padlock.h | 34 +- thirdparty/mbedtls/include/mbedtls/pem.h | 2 +- thirdparty/mbedtls/include/mbedtls/pk.h | 221 +- thirdparty/mbedtls/include/mbedtls/pk_internal.h | 23 + thirdparty/mbedtls/include/mbedtls/pkcs11.h | 3 +- thirdparty/mbedtls/include/mbedtls/pkcs12.h | 4 + thirdparty/mbedtls/include/mbedtls/pkcs5.h | 4 + thirdparty/mbedtls/include/mbedtls/platform.h | 6 +- thirdparty/mbedtls/include/mbedtls/platform_util.h | 123 ++ thirdparty/mbedtls/include/mbedtls/poly1305.h | 55 +- thirdparty/mbedtls/include/mbedtls/ripemd160.h | 4 +- thirdparty/mbedtls/include/mbedtls/rsa.h | 596 ++++-- thirdparty/mbedtls/include/mbedtls/sha1.h | 64 +- thirdparty/mbedtls/include/mbedtls/sha256.h | 91 +- thirdparty/mbedtls/include/mbedtls/sha512.h | 91 +- thirdparty/mbedtls/include/mbedtls/ssl.h | 380 +++- thirdparty/mbedtls/include/mbedtls/ssl_cookie.h | 2 +- thirdparty/mbedtls/include/mbedtls/ssl_internal.h | 74 +- thirdparty/mbedtls/include/mbedtls/ssl_ticket.h | 4 +- thirdparty/mbedtls/include/mbedtls/threading.h | 16 +- thirdparty/mbedtls/include/mbedtls/timing.h | 2 +- thirdparty/mbedtls/include/mbedtls/version.h | 8 +- thirdparty/mbedtls/include/mbedtls/x509_crt.h | 139 +- thirdparty/mbedtls/include/mbedtls/xtea.h | 4 +- thirdparty/mbedtls/library/aes.c | 134 +- thirdparty/mbedtls/library/aria.c | 85 +- thirdparty/mbedtls/library/asn1write.c | 57 +- thirdparty/mbedtls/library/bignum.c | 265 ++- thirdparty/mbedtls/library/blowfish.c | 58 +- thirdparty/mbedtls/library/camellia.c | 70 +- thirdparty/mbedtls/library/ccm.c | 73 +- thirdparty/mbedtls/library/certs.c | 43 +- thirdparty/mbedtls/library/chacha20.c | 48 +- thirdparty/mbedtls/library/chachapoly.c | 111 +- thirdparty/mbedtls/library/cipher.c | 140 +- thirdparty/mbedtls/library/cipher_wrap.c | 6 +- thirdparty/mbedtls/library/ctr_drbg.c | 175 +- thirdparty/mbedtls/library/debug.c | 50 + thirdparty/mbedtls/library/dhm.c | 58 +- thirdparty/mbedtls/library/ecdh.c | 535 ++++- thirdparty/mbedtls/library/ecdsa.c | 563 ++++- thirdparty/mbedtls/library/ecjpake.c | 38 +- thirdparty/mbedtls/library/ecp.c | 1204 +++++++++-- thirdparty/mbedtls/library/ecp_curves.c | 8 + thirdparty/mbedtls/library/entropy_poll.c | 86 +- thirdparty/mbedtls/library/error.c | 39 +- thirdparty/mbedtls/library/gcm.c | 50 +- thirdparty/mbedtls/library/hmac_drbg.c | 124 +- thirdparty/mbedtls/library/nist_kw.c | 4 +- thirdparty/mbedtls/library/pem.c | 6 +- thirdparty/mbedtls/library/pk.c | 209 +- thirdparty/mbedtls/library/pk_wrap.c | 200 +- thirdparty/mbedtls/library/pkcs12.c | 4 + thirdparty/mbedtls/library/pkcs5.c | 17 +- thirdparty/mbedtls/library/pkparse.c | 89 +- thirdparty/mbedtls/library/pkwrite.c | 32 +- thirdparty/mbedtls/library/platform.c | 13 +- thirdparty/mbedtls/library/platform_util.c | 69 + thirdparty/mbedtls/library/poly1305.c | 48 +- thirdparty/mbedtls/library/rsa.c | 490 ++++- thirdparty/mbedtls/library/rsa_internal.c | 9 +- thirdparty/mbedtls/library/sha1.c | 24 + thirdparty/mbedtls/library/sha256.c | 25 + thirdparty/mbedtls/library/sha512.c | 25 + thirdparty/mbedtls/library/ssl_ciphersuites.c | 6 +- thirdparty/mbedtls/library/ssl_cli.c | 196 +- thirdparty/mbedtls/library/ssl_srv.c | 89 +- thirdparty/mbedtls/library/ssl_ticket.c | 16 +- thirdparty/mbedtls/library/ssl_tls.c | 2263 +++++++++++++++----- thirdparty/mbedtls/library/threading.c | 47 + thirdparty/mbedtls/library/timing.c | 12 +- thirdparty/mbedtls/library/version_features.c | 6 + thirdparty/mbedtls/library/x509.c | 11 +- thirdparty/mbedtls/library/x509_create.c | 171 +- thirdparty/mbedtls/library/x509_crt.c | 728 ++++--- 111 files changed, 11310 insertions(+), 3794 deletions(-) (limited to 'thirdparty/mbedtls') diff --git a/thirdparty/mbedtls/include/mbedtls/aes.h b/thirdparty/mbedtls/include/mbedtls/aes.h index f6603d5962..b42e564efc 100644 --- a/thirdparty/mbedtls/include/mbedtls/aes.h +++ b/thirdparty/mbedtls/include/mbedtls/aes.h @@ -60,7 +60,11 @@ /* Error codes in range 0x0021-0x0025 */ #define MBEDTLS_ERR_AES_BAD_INPUT_DATA -0x0021 /**< Invalid input data. */ + +/* MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE is deprecated and should not be used. */ #define MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE -0x0023 /**< Feature not available. For example, an unsupported AES key size. */ + +/* MBEDTLS_ERR_AES_HW_ACCEL_FAILED is deprecated and should not be used. */ #define MBEDTLS_ERR_AES_HW_ACCEL_FAILED -0x0025 /**< AES hardware accelerator failed. */ #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ @@ -79,7 +83,7 @@ extern "C" { /** * \brief The AES context-type definition. */ -typedef struct +typedef struct mbedtls_aes_context { int nr; /*!< The number of rounds. */ uint32_t *rk; /*!< AES round keys. */ @@ -98,7 +102,7 @@ mbedtls_aes_context; /** * \brief The AES XTS context-type definition. */ -typedef struct +typedef struct mbedtls_aes_xts_context { mbedtls_aes_context crypt; /*!< The AES context to use for AES block encryption or decryption. */ @@ -117,7 +121,7 @@ typedef struct * It must be the first API called before using * the context. * - * \param ctx The AES context to initialize. + * \param ctx The AES context to initialize. This must not be \c NULL. */ void mbedtls_aes_init( mbedtls_aes_context *ctx ); @@ -125,6 +129,8 @@ void mbedtls_aes_init( mbedtls_aes_context *ctx ); * \brief This function releases and clears the specified AES context. * * \param ctx The AES context to clear. + * If this is \c NULL, this function does nothing. + * Otherwise, the context must have been at least initialized. */ void mbedtls_aes_free( mbedtls_aes_context *ctx ); @@ -135,7 +141,7 @@ void mbedtls_aes_free( mbedtls_aes_context *ctx ); * It must be the first API called before using * the context. * - * \param ctx The AES XTS context to initialize. + * \param ctx The AES XTS context to initialize. This must not be \c NULL. */ void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx ); @@ -143,6 +149,8 @@ void mbedtls_aes_xts_init( mbedtls_aes_xts_context *ctx ); * \brief This function releases and clears the specified AES XTS context. * * \param ctx The AES XTS context to clear. + * If this is \c NULL, this function does nothing. + * Otherwise, the context must have been at least initialized. */ void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx ); #endif /* MBEDTLS_CIPHER_MODE_XTS */ @@ -151,7 +159,9 @@ void mbedtls_aes_xts_free( mbedtls_aes_xts_context *ctx ); * \brief This function sets the encryption key. * * \param ctx The AES context to which the key should be bound. + * It must be initialized. * \param key The encryption key. + * This must be a readable buffer of size \p keybits bits. * \param keybits The size of data passed in bits. Valid options are: *