Skip to content

Commit 9a4237e

Browse files
Merge pull request #6457 from lealem47/gcc-arm-user-settings
Improve GCC-ARM user-settings.h FIPS configurability
2 parents 145ca4a + 88c3d9a commit 9a4237e

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

IDE/GCC-ARM/Header/user_settings.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,24 @@ extern "C" {
8585
/* FIPS - Requires eval or license from wolfSSL */
8686
/* ------------------------------------------------------------------------- */
8787
#undef HAVE_FIPS
88+
#undef HAVE_FIPS_VERSION
89+
#undef HAVE_FIPS_VERSION_MINOR
8890
#if 0
8991
#define HAVE_FIPS
9092

91-
#undef HAVE_FIPS_VERSION
92-
#define HAVE_FIPS_VERSION 2
93+
/* Choose a FIPS version */
94+
#if 0
95+
/* FIPS 140-2 */
96+
#define HAVE_FIPS_VERSION 2
97+
#elif 0
98+
/* FIPS 140-3 */
99+
#define HAVE_FIPS_VERSION 5
100+
#define HAVE_FIPS_VERSION_MINOR 2
101+
#elif 0
102+
/* FIPS Ready */
103+
#define HAVE_FIPS_VERSION 5
104+
#define HAVE_FIPS_VERSION_MINOR 3
105+
#endif
93106

94107
#ifdef SINGLE_THREADED
95108
#undef NO_THREAD_LS
@@ -182,6 +195,9 @@ extern "C" {
182195

183196
#undef WOLFSSL_VALIDATE_ECC_IMPORT
184197
#define WOLFSSL_VALIDATE_ECC_IMPORT /* Validate import */
198+
199+
#undef WOLFSSL_ECDSA_SET_K
200+
#define WOLFSSL_ECDSA_SET_K
185201
#endif
186202

187203
/* Compressed Key Support */

IDE/GCC-ARM/Makefile.common

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Set to @ if you want to suppress command echo
2-
CMD_ECHO =
2+
CMD_ECHO =
33

44
# Important directories
55
BUILD_DIR = ./Build
66

77
# Toolchain location and prefix
8-
#TOOLCHAIN =
8+
#TOOLCHAIN =
99
TOOLCHAIN ?= /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
1010

1111
# Tools selection
@@ -101,6 +101,7 @@ SRC_C += ../../wolfcrypt/src/des3.c
101101
SRC_C += ../../wolfcrypt/src/dh.c
102102
SRC_C += ../../wolfcrypt/src/ecc.c
103103
SRC_C += ../../wolfcrypt/src/hmac.c
104+
SRC_C += ../../wolfcrypt/src/kdf.c
104105
SRC_C += ../../wolfcrypt/src/random.c
105106
SRC_C += ../../wolfcrypt/src/rsa.c
106107
SRC_C += ../../wolfcrypt/src/sha.c
@@ -138,7 +139,6 @@ SRC_C += ../../wolfcrypt/src/ge_448.c
138139
SRC_C += ../../wolfcrypt/src/ge_low_mem.c
139140
SRC_C += ../../wolfcrypt/src/ge_operations.c
140141
SRC_C += ../../wolfcrypt/src/hash.c
141-
SRC_C += ../../wolfcrypt/src/kdf.c
142142
SRC_C += ../../wolfcrypt/src/integer.c
143143
SRC_C += ../../wolfcrypt/src/logging.c
144144
SRC_C += ../../wolfcrypt/src/md5.c

0 commit comments

Comments
 (0)