Skip to content

crypto/mbedtls: Use config defining flag globally #3394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/crypto_test/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ pkg.deps:
- "@apache-mynewt-core/sys/log"
- "@apache-mynewt-core/crypto/mbedtls"
- "@apache-mynewt-core/crypto/tinycrypt"

pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'
2 changes: 0 additions & 2 deletions apps/hash_test/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ pkg.deps:
- "@apache-mynewt-core/sys/log"
- "@apache-mynewt-core/crypto/mbedtls"
- "@apache-mynewt-core/crypto/tinycrypt"

pkg.cflags: '-DMBEDTLS_USER_CONFIG_FILE="mbedtls/config_mynewt.h"'
7 changes: 5 additions & 2 deletions crypto/mbedtls/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ pkg.keywords:
- tls
pkg.type: sdk

pkg.cflags:
app.cflags:
- '-DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h>'
app.cflags.TEST:
- '-DTEST'

pkg.cflags:
- -Wno-maybe-uninitialized
- -Wno-unknown-warning-option
pkg.cflags.TEST: -DTEST

pkg.include_dirs:
- "include"
Expand Down
4 changes: 3 additions & 1 deletion crypto/mbedtls/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ syscfg.defs:
value: 0
MBEDTLS_CIPHER_MODE_CFB:
value: 0
# XXX: This should be 0 on default, but mcuboot's test needs this enabled. Until a new mcuboot version with this
# config enabled is released we have to enable this by default.
MBEDTLS_CIPHER_MODE_CTR:
value: 0
value: 1
MBEDTLS_CIPHER_MODE_OFB:
value: 0
MBEDTLS_CIPHER_MODE_XTS:
Expand Down