bluetooth: Make controller crypto functions optional
Provide flexibility in choosing to use the host defined crypto functions or the ones provided by the controller Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
3c6eb7d024
commit
5e3c48f43c
3 changed files with 15 additions and 4 deletions
|
@ -7,11 +7,15 @@ zephyr_library_sources(
|
|||
ticker/ticker.c
|
||||
ll_sw/ll_addr.c
|
||||
ll_sw/ll_tx_pwr.c
|
||||
crypto/crypto.c
|
||||
hci/hci_driver.c
|
||||
hci/hci.c
|
||||
)
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_CTLR_CRYPTO
|
||||
crypto/crypto.c
|
||||
)
|
||||
|
||||
if(CONFIG_BT_LL_SW)
|
||||
zephyr_library_sources(
|
||||
ll_sw/ctrl.c
|
||||
|
|
|
@ -33,6 +33,13 @@ endchoice
|
|||
|
||||
comment "BLE Controller configuration"
|
||||
|
||||
config BT_CTLR_CRYPTO
|
||||
bool "Enable crypto functions in Controller"
|
||||
default y
|
||||
help
|
||||
Use random number generation and AES encryption support functions
|
||||
provided by the controller.
|
||||
|
||||
config BT_CTLR_RX_PRIO_STACK_SIZE
|
||||
# Hidden option for Controller's Co-Operative high priority Rx thread
|
||||
# stack size.
|
||||
|
|
|
@ -124,10 +124,10 @@ source "subsys/bluetooth/host/mesh/Kconfig"
|
|||
|
||||
config BT_HOST_CRYPTO
|
||||
# Hidden option that compiles in random number generation and AES
|
||||
# encryption support using TinyCrypt library if software-based
|
||||
# controller is disabled.
|
||||
# encryption support using TinyCrypt library if this is not provided
|
||||
# by the controller implementation.
|
||||
bool
|
||||
default y if !BT_CTLR
|
||||
default y if !BT_CTLR_CRYPTO
|
||||
select TINYCRYPT
|
||||
select TINYCRYPT_AES
|
||||
select TINYCRYPT_SHA256
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue