mbedtls: refresh patches

Fixes: #851

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-01-04 15:39:28 +08:00
parent 39d0340576
commit c458cc2443
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -111,7 +111,7 @@ Then run normal make or cmake etc.
#if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C)
#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
#endif
@@ -934,3 +938,4 @@
@@ -956,3 +960,4 @@
typedef int mbedtls_iso_c_forbids_empty_translation_units;
#endif /* MBEDTLS_CHECK_CONFIG_H */
@ -126,7 +126,7 @@ Then run normal make or cmake etc.
* library/aria.c
* library/timing.c
* include/mbedtls/bn_mul.h
@@ -2329,6 +2330,21 @@
@@ -2331,6 +2332,21 @@
#define MBEDTLS_AESNI_C
/**
@ -158,10 +158,10 @@ Then run normal make or cmake etc.
+#if defined(MBEDTLS_ARMV8CE_AES_C)
+#include "mbedtls/armv8ce_aes.h"
+#endif
#if defined(MBEDTLS_SELF_TEST)
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
@@ -999,6 +1001,11 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_c
#if !defined(MBEDTLS_AES_ALT)
@@ -992,6 +994,11 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_c
return( mbedtls_aesni_crypt_ecb( ctx, mode, input, output ) );
#endif
@ -330,7 +330,7 @@ Then run normal make or cmake etc.
base64.c
--- a/library/gcm.c
+++ b/library/gcm.c
@@ -41,6 +41,10 @@
@@ -42,6 +42,10 @@
#include "mbedtls/aesni.h"
#endif
@ -338,10 +338,10 @@ Then run normal make or cmake etc.
+#include "mbedtls/armv8ce_aes.h"
+#endif
+
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C)
#include "mbedtls/aes.h"
#include "mbedtls/platform.h"
@@ -87,6 +91,12 @@ static int gcm_gen_table( mbedtls_gcm_co
#if !defined(MBEDTLS_GCM_ALT)
/* Parameter validation macros */
@@ -79,6 +83,12 @@ static int gcm_gen_table( mbedtls_gcm_co
if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 )
return( ret );
@ -354,7 +354,7 @@ Then run normal make or cmake etc.
/* pack h as two 64-bits ints, big-endian */
hi = MBEDTLS_GET_UINT32_BE( h, 0 );
lo = MBEDTLS_GET_UINT32_BE( h, 4 );
@@ -196,6 +206,11 @@ static void gcm_mult( mbedtls_gcm_contex
@@ -188,6 +198,11 @@ static void gcm_mult( mbedtls_gcm_contex
unsigned char lo, hi, rem;
uint64_t zh, zl;