Skip to content

Commit 73c731b

Browse files
committed
FIX: mbedtls/common.h file is only for private use
1 parent f4e8e6b commit 73c731b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/core/p-crypt.c

+11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@
3939

4040
#ifdef INCLUDE_MBEDTLS
4141

42+
#ifndef MBEDTLS_GET_UINT32_BE
43+
// including it here as it is defined only for private use in the mbedTLS sources
44+
#define MBEDTLS_GET_UINT32_BE( data , offset ) \
45+
( \
46+
( (uint32_t) ( data )[( offset ) ] << 24 ) \
47+
| ( (uint32_t) ( data )[( offset ) + 1] << 16 ) \
48+
| ( (uint32_t) ( data )[( offset ) + 2] << 8 ) \
49+
| ( (uint32_t) ( data )[( offset ) + 3] ) \
50+
)
51+
#endif
52+
4253

4354
/***********************************************************************
4455
**

src/include/sys-crypt.h

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
***********************************************************************/
2727

2828
#include "sys-core.h"
29-
#include "mbedtls/common.h"
3029
#include "mbedtls/rsa.h"
3130
#include "mbedtls/dhm.h"
3231
#include "mbedtls/bignum.h"

0 commit comments

Comments
 (0)