Skip to content

Commit f68aeba

Browse files
committed
crypto/mbedtls: Use config defining flag globally
Now -DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h> flag is used globally for each build that depends on mbedtls package. This way we won't have to add this flag in each package that uses mbedtls.
1 parent 165790f commit f68aeba

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

apps/crypto_test/pkg.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ pkg.deps:
2828
- "@apache-mynewt-core/sys/log"
2929
- "@apache-mynewt-core/crypto/mbedtls"
3030
- "@apache-mynewt-core/crypto/tinycrypt"
31-
32-
pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'

apps/hash_test/pkg.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ pkg.deps:
2828
- "@apache-mynewt-core/sys/log"
2929
- "@apache-mynewt-core/crypto/mbedtls"
3030
- "@apache-mynewt-core/crypto/tinycrypt"
31-
32-
pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'

crypto/mbedtls/pkg.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ pkg.keywords:
2626
- tls
2727
pkg.type: sdk
2828

29-
pkg.cflags:
29+
app.cflags:
3030
- '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h>'
31+
app.cflags.TEST:
32+
- '-DTEST'
33+
34+
pkg.cflags:
3135
- -Wno-maybe-uninitialized
3236
- -Wno-unknown-warning-option
33-
pkg.cflags.TEST: -DTEST
3437

3538
pkg.include_dirs:
3639
- "include"

crypto/mbedtls/syscfg.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ syscfg.defs:
119119
value: 0
120120
MBEDTLS_CIPHER_MODE_CFB:
121121
value: 0
122+
# XXX: This should be 0 on default, but mcuboot's test needs this enabled. Until a new mcuboot version with this
123+
# config enabled is released we have to enable this by default.
122124
MBEDTLS_CIPHER_MODE_CTR:
123-
value: 0
125+
value: 1
124126
MBEDTLS_CIPHER_MODE_OFB:
125127
value: 0
126128
MBEDTLS_CIPHER_MODE_XTS:

0 commit comments

Comments
 (0)