Skip to content

Commit d033e9b

Browse files
committed
libAtomVM: fix mbedtls 3.6.1 ECDSA helper gate
Signed-off-by: Peter M <petermm@gmail.com>
1 parent 6eed2a4 commit d033e9b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/libAtomVM/otp_crypto.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848
#else
4949
#include <mbedtls/config.h>
5050
#endif
51-
#ifdef MBEDTLS_VERSION_C
52-
#include <mbedtls/version.h>
53-
#endif
5451

5552
#ifdef HAVE_PSA_CRYPTO
5653
#include <mbedtls/psa_util.h>
@@ -81,7 +78,8 @@
8178
// #define ENABLE_TRACE
8279
#include "trace.h"
8380

84-
#if MBEDTLS_VERSION_NUMBER > 0x03060100
81+
// mbedtls_ecdsa_{raw_to,der_to}_der are available in 3.6.1+ and 4.x.
82+
#if MBEDTLS_VERSION_NUMBER >= 0x03060100
8583
#define HAVE_MBEDTLS_ECDSA_RAW_TO_DER 1
8684
#define HAVE_MBEDTLS_ECDSA_DER_TO_RAW 1
8785
#endif

0 commit comments

Comments
 (0)