Skip to content

Commit

Permalink
FIX: failing Base and Core builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 11, 2022
1 parent 245a10b commit 3464126
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/core/u-mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@

#include "sys-core.h"
#ifdef INCLUDE_MBEDTLS
#ifdef MBEDTLS_MD4_C
#ifdef INCLUDE_MD4
#include "mbedtls/md4.h"
#endif
#include "mbedtls/md5.h"
#include "mbedtls/sha1.h"
#include "mbedtls/sha256.h"
#include "mbedtls/sha512.h"
#ifdef MBEDTLS_RIPEMD160_C
#ifdef INCLUDE_RIPEMD160
#include "mbedtls/ripemd160.h"
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/include/mbedtls/build_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
#define _CRT_SECURE_NO_DEPRECATE 1
#endif

#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#if !defined(REBOL_OPTIONS_FILE)
#include "opt-config.h"
#else
#include MBEDTLS_CONFIG_FILE
#include REBOL_OPTIONS_FILE
#endif

#if defined(MBEDTLS_CONFIG_VERSION) && ( \
Expand Down
5 changes: 0 additions & 5 deletions src/include/mbedtls/check_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#ifndef MBEDTLS_CHECK_CONFIG_H
#define MBEDTLS_CHECK_CONFIG_H

/* MD4 was removed from mbedtls, because it is considered to be unsecure,
* but I'm keeping the old source file for use in Rebol
*/
#define MBEDTLS_MD4_C

/*
* We assume CHAR_BIT is 8 in many places. In practice, this is true on our
* target platforms, so not an issue, but let's just be extra sure.
Expand Down
36 changes: 20 additions & 16 deletions src/include/opt-dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,38 @@
//** dependency fixes! ****************************************//

#if defined(INCLUDE_MBEDTLS)
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
//#include "mbedtls/config.h"

#define MBEDTLS_HAVE_ASM
#define MBEDTLS_HAVE_SSE2
#define MBEDTLS_HAVE_TIME
#define MBEDTLS_HAVE_TIME_DATE
#define MBEDTLS_PLATFORM_C
//#define MBEDTLS_PLATFORM_MEMORY
//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C

#define MBEDTLS_MD5_C
#define MBEDTLS_SHA1_C
#define MBEDTLS_SHA224_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_SHA512_C

#if defined(INCLUDE_MD4)
#define MBEDTLS_MD4_C
#else
#undef MBEDTLS_MD4_C
#endif

#if defined(INCLUDE_RIPEMD160)
#define MBEDTLS_RIPEMD160_C
#else
#undef MBEDTLS_RIPEMD160_C
#endif

#if defined(INCLUDE_SHA224)
#define MBEDTLS_SHA224_C
#else
#undef MBEDTLS_SHA224_C
#endif
// INCLUDE_SHA224 is now required for SHA256, which is always included!
//#if defined(INCLUDE_SHA224)
//#define MBEDTLS_SHA224_C
//#endif

#if defined(INCLUDE_SHA384)
#define MBEDTLS_SHA384_C
#else
#undef MBEDTLS_SHA384_C
#endif
#else
// no mbedTLS
Expand Down

0 comments on commit 3464126

Please sign in to comment.