Skip to content

Commit b95da8d

Browse files
remove crypto when missing ECDH
1 parent fee9867 commit b95da8d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xCrypto.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <stdio.h>
2525
#include <string.h>
2626

27+
#if defined(MBEDTLS_ECDH_C)
2728

2829
#include "mbedtls/platform.h"
2930
#include "mbedtls/ecdh.h"
@@ -183,3 +184,5 @@ void CryptoToolbox::swap_endian(uint8_t* buf, size_t len) {
183184
} // pal
184185
} // ble
185186

187+
#endif //defined(MBEDTLS_ECDH_C)
188+

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xCrypto.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include MBEDTLS_CONFIG_FILE
2626
#endif
2727

28+
#if defined(MBEDTLS_ECDH_C)
29+
2830
#include "mbedtls/platform.h"
2931
#include "mbedtls/entropy.h"
3032
#include "mbedtls/ecp.h"
@@ -139,4 +141,6 @@ class CryptoToolbox : mbed::NonCopyable<CryptoToolbox> {
139141
} // pal
140142
} // ble
141143

144+
#endif // defined(MBEDTLS_ECDH_C)
145+
142146
#endif // NRF5X_CRYPTO_

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xPalSecurityManager.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
#include "ble/BLETypes.h"
2121
#include "ble/pal/PalSecurityManager.h"
2222
#include "nrf_ble.h"
23-
#if defined(MBEDTLS_ECDH_C)
2423
#include "nRF5xCrypto.h"
25-
#endif
24+
2625

2726
namespace ble {
2827
namespace pal {

0 commit comments

Comments
 (0)