Bluetooth: Add Kconfig option to disable HCI ECDH support

This adds Kconfig option to disable HCI ECDH support.
It will compile out ECDH related code, especially HCI event handlers.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2018-11-21 13:53:35 +01:00 committed by Anas Nashif
commit b904ad387f
3 changed files with 17 additions and 2 deletions

View file

@ -273,6 +273,7 @@ config BT_SMP
select TINYCRYPT_AES
select TINYCRYPT_AES_CMAC
select BT_RPA
select BT_ECC
help
This option enables support for the Security Manager Protocol
(SMP), making it possible to pair devices over LE.
@ -488,12 +489,17 @@ config BT_ID_MAX
endif # BT_HCI_HOST
config BT_ECC
bool "Enable ECDH key generation support"
help
This option adds support for ECDH HCI commands.
config BT_TINYCRYPT_ECC
bool "Use TinyCrypt library for ECDH"
select TINYCRYPT
select TINYCRYPT_ECC_DH
depends on BT_HCI_RAW || BT_HCI_HOST
default y if BT_CTLR && (BT_SMP || BT_MESH_PROV)
depends on BT_ECC && (BT_HCI_RAW || BT_HCI_HOST)
default y if BT_CTLR
help
If this option is set TinyCrypt library is used for emulating the
ECDH HCI commands and events needed by e.g. LE Secure Connections.