Skip to content

Commit 3464126

Browse files
committed
FIX: failing Base and Core builds
resolves: Oldes/Rebol-issues#2478
1 parent 245a10b commit 3464126

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

src/core/u-mbedtls.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232

3333
#include "sys-core.h"
3434
#ifdef INCLUDE_MBEDTLS
35-
#ifdef MBEDTLS_MD4_C
35+
#ifdef INCLUDE_MD4
3636
#include "mbedtls/md4.h"
3737
#endif
3838
#include "mbedtls/md5.h"
3939
#include "mbedtls/sha1.h"
4040
#include "mbedtls/sha256.h"
4141
#include "mbedtls/sha512.h"
42-
#ifdef MBEDTLS_RIPEMD160_C
42+
#ifdef INCLUDE_RIPEMD160
4343
#include "mbedtls/ripemd160.h"
4444
#endif
4545

src/include/mbedtls/build_info.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
#define _CRT_SECURE_NO_DEPRECATE 1
5454
#endif
5555

56-
#if !defined(MBEDTLS_CONFIG_FILE)
57-
#include "mbedtls/config.h"
56+
#if !defined(REBOL_OPTIONS_FILE)
57+
#include "opt-config.h"
5858
#else
59-
#include MBEDTLS_CONFIG_FILE
59+
#include REBOL_OPTIONS_FILE
6060
#endif
6161

6262
#if defined(MBEDTLS_CONFIG_VERSION) && ( \

src/include/mbedtls/check_config.h

-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
#ifndef MBEDTLS_CHECK_CONFIG_H
2424
#define MBEDTLS_CHECK_CONFIG_H
2525

26-
/* MD4 was removed from mbedtls, because it is considered to be unsecure,
27-
* but I'm keeping the old source file for use in Rebol
28-
*/
29-
#define MBEDTLS_MD4_C
30-
3126
/*
3227
* We assume CHAR_BIT is 8 in many places. In practice, this is true on our
3328
* target platforms, so not an issue, but let's just be extra sure.

src/include/opt-dependencies.h

+20-16
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,38 @@
3535
//** dependency fixes! ****************************************//
3636

3737
#if defined(INCLUDE_MBEDTLS)
38-
#if !defined(MBEDTLS_CONFIG_FILE)
39-
#include "mbedtls/config.h"
40-
#else
41-
#include MBEDTLS_CONFIG_FILE
42-
#endif
38+
//#include "mbedtls/config.h"
39+
40+
#define MBEDTLS_HAVE_ASM
41+
#define MBEDTLS_HAVE_SSE2
42+
#define MBEDTLS_HAVE_TIME
43+
#define MBEDTLS_HAVE_TIME_DATE
44+
#define MBEDTLS_PLATFORM_C
45+
46+
//#define MBEDTLS_PLATFORM_MEMORY
47+
//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
48+
49+
#define MBEDTLS_MD5_C
50+
#define MBEDTLS_SHA1_C
51+
#define MBEDTLS_SHA224_C
52+
#define MBEDTLS_SHA256_C
53+
#define MBEDTLS_SHA512_C
4354

4455
#if defined(INCLUDE_MD4)
4556
#define MBEDTLS_MD4_C
46-
#else
47-
#undef MBEDTLS_MD4_C
4857
#endif
4958

5059
#if defined(INCLUDE_RIPEMD160)
5160
#define MBEDTLS_RIPEMD160_C
52-
#else
53-
#undef MBEDTLS_RIPEMD160_C
5461
#endif
5562

56-
#if defined(INCLUDE_SHA224)
57-
#define MBEDTLS_SHA224_C
58-
#else
59-
#undef MBEDTLS_SHA224_C
60-
#endif
63+
// INCLUDE_SHA224 is now required for SHA256, which is always included!
64+
//#if defined(INCLUDE_SHA224)
65+
//#define MBEDTLS_SHA224_C
66+
//#endif
6167

6268
#if defined(INCLUDE_SHA384)
6369
#define MBEDTLS_SHA384_C
64-
#else
65-
#undef MBEDTLS_SHA384_C
6670
#endif
6771
#else
6872
// no mbedTLS

0 commit comments

Comments
 (0)