From 132ec29424fa46f55690f317fe372c64597d7639 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 12 Jan 2026 09:17:54 +0100 Subject: [PATCH] Fix SHA256 alt Signed-off-by: Pol Henarejos --- config/mbedtls_config.h | 2 +- config/rp2350/alt/sha256_alt.c | 6 ++++++ config/rp2350/alt/sha256_alt.h | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/mbedtls_config.h b/config/mbedtls_config.h index 0311975..6da7bd8 100644 --- a/config/mbedtls_config.h +++ b/config/mbedtls_config.h @@ -330,7 +330,7 @@ //#define MBEDTLS_RSA_ALT //#define MBEDTLS_SHA1_ALT #ifdef PICO_RP2350 -#define MBEDTLS_SHA256_ALT +//#define MBEDTLS_SHA256_ALT #endif //#define MBEDTLS_SHA512_ALT diff --git a/config/rp2350/alt/sha256_alt.c b/config/rp2350/alt/sha256_alt.c index 17f5517..82bcd4d 100644 --- a/config/rp2350/alt/sha256_alt.c +++ b/config/rp2350/alt/sha256_alt.c @@ -286,3 +286,9 @@ int mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char *output) { } return 0; } + +void mbedtls_sha256_clone(mbedtls_sha256_context *dst, + const mbedtls_sha256_context *src) +{ + *dst = *src; +} diff --git a/config/rp2350/alt/sha256_alt.h b/config/rp2350/alt/sha256_alt.h index 0e1ada4..d480ce6 100644 --- a/config/rp2350/alt/sha256_alt.h +++ b/config/rp2350/alt/sha256_alt.h @@ -18,7 +18,6 @@ #ifndef _SHA256_ALT_H_ #define _SHA256_ALT_H_ -#include "pico_keys.h" #include "pico/sha256.h" typedef struct mbedtls_sha256_context {