mbedtls: Update to upstream version 2.28.9
(cherry picked from commit 881645fff9)
This commit is contained in:
15
thirdparty/mbedtls/library/common.h
vendored
15
thirdparty/mbedtls/library/common.h
vendored
@ -337,17 +337,18 @@ static inline const unsigned char *mbedtls_buffer_offset_const(
|
||||
#endif
|
||||
|
||||
/* Always provide a static assert macro, so it can be used unconditionally.
|
||||
* It will expand to nothing on some systems.
|
||||
* Can be used outside functions (but don't add a trailing ';' in that case:
|
||||
* the semicolon is included here to avoid triggering -Wextra-semi when
|
||||
* MBEDTLS_STATIC_ASSERT() expands to nothing).
|
||||
* Can't use the C11-style `defined(static_assert)` on FreeBSD, since it
|
||||
* It will expand to nothing on some systems. */
|
||||
/* Can't use the C11-style `defined(static_assert)` on FreeBSD, since it
|
||||
* defines static_assert even with -std=c99, but then complains about it.
|
||||
*/
|
||||
#if defined(static_assert) && !defined(__FreeBSD__)
|
||||
#define MBEDTLS_STATIC_ASSERT(expr, msg) static_assert(expr, msg);
|
||||
#define MBEDTLS_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
|
||||
#else
|
||||
#define MBEDTLS_STATIC_ASSERT(expr, msg)
|
||||
/* Make sure `MBEDTLS_STATIC_ASSERT(expr, msg);` is valid both inside and
|
||||
* outside a function. We choose a struct declaration, which can be repeated
|
||||
* any number of times and does not need a matching definition. */
|
||||
#define MBEDTLS_STATIC_ASSERT(expr, msg) \
|
||||
struct ISO_C_does_not_allow_extra_semicolon_outside_of_a_function
|
||||
#endif
|
||||
|
||||
/* Suppress compiler warnings for unused functions and variables. */
|
||||
|
||||
4
thirdparty/mbedtls/library/entropy_poll.c
vendored
4
thirdparty/mbedtls/library/entropy_poll.c
vendored
@ -5,10 +5,12 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#if defined(__linux__) || defined(__midipix__) && !defined(_GNU_SOURCE)
|
||||
#if defined(__linux__) || defined(__midipix__)
|
||||
/* Ensure that syscall() is available even when compiling with -std=c99 */
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
1
thirdparty/mbedtls/library/oid.c
vendored
1
thirdparty/mbedtls/library/oid.c
vendored
@ -15,6 +15,7 @@
|
||||
#include "mbedtls/rsa.h"
|
||||
#include "mbedtls/error.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
1
thirdparty/mbedtls/library/ssl_msg.c
vendored
1
thirdparty/mbedtls/library/ssl_msg.c
vendored
@ -29,6 +29,7 @@
|
||||
#include "constant_time_internal.h"
|
||||
#include "mbedtls/constant_time.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
|
||||
1
thirdparty/mbedtls/library/ssl_tls.c
vendored
1
thirdparty/mbedtls/library/ssl_tls.c
vendored
@ -4452,6 +4452,7 @@ static void ssl_remove_psk(mbedtls_ssl_context *ssl)
|
||||
ssl->handshake->psk_len);
|
||||
mbedtls_free(ssl->handshake->psk);
|
||||
ssl->handshake->psk_len = 0;
|
||||
ssl->handshake->psk = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1
thirdparty/mbedtls/library/x509_crt.c
vendored
1
thirdparty/mbedtls/library/x509_crt.c
vendored
@ -26,6 +26,7 @@
|
||||
#include "mbedtls/oid.h"
|
||||
#include "mbedtls/platform_util.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(MBEDTLS_PEM_PARSE_C)
|
||||
|
||||
Reference in New Issue
Block a user