16
16
17
17
#include " BLERoles.h"
18
18
19
- #if BLE_FEATURE_SECURITY
20
-
21
19
#include " ble/SecurityManager.h"
22
20
#include " ble/pal/PalSecurityManager.h"
23
21
#include " ble/generic/GenericSecurityManager.h"
@@ -399,7 +397,6 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::setKeyp
399
397
return BLE_ERROR_NONE;
400
398
}
401
399
402
- #if BLE_FEATURE_SIGNING
403
400
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
404
401
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::enableSigning_(
405
402
connection_handle_t connection,
@@ -441,7 +438,6 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::enableS
441
438
442
439
return BLE_ERROR_NONE;
443
440
}
444
- #endif // BLE_FEATURE_SIGNING
445
441
446
442
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
447
443
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::setHintFutureRoleReversal_(bool enable) {
@@ -592,7 +588,6 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::setEncr
592
588
// //////////////////////////////////////////////////////////////////////////
593
589
// Keys
594
590
//
595
- #if BLE_FEATURE_SIGNING
596
591
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
597
592
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::getSigningKey_(connection_handle_t connection, bool authenticated) {
598
593
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
@@ -627,19 +622,16 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::getSign
627
622
}
628
623
}
629
624
}
630
- #endif // BLE_FEATURE_SIGNING
631
625
632
626
// //////////////////////////////////////////////////////////////////////////
633
627
// Privacy
634
628
//
635
629
636
- #if BLE_FEATURE_PRIVACY
637
630
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
638
631
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::setPrivateAddressTimeout_(uint16_t timeout_in_seconds) {
639
632
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
640
633
return _pal.set_private_address_timeout (timeout_in_seconds);
641
634
}
642
- #endif // BLE_FEATURE_PRIVACY
643
635
644
636
// //////////////////////////////////////////////////////////////////////////
645
637
// Authentication
@@ -855,7 +847,6 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::init_da
855
847
return BLE_ERROR_NONE;
856
848
}
857
849
858
- #if BLE_FEATURE_PRIVACY
859
850
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
860
851
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::init_resolving_list() {
861
852
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
@@ -881,9 +872,7 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::init_re
881
872
882
873
return BLE_ERROR_NONE;
883
874
}
884
- #endif // BLE_FEATURE_PRIVACY
885
875
886
- #if BLE_FEATURE_SIGNING
887
876
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
888
877
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::init_signing() {
889
878
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
@@ -905,7 +894,6 @@ ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::init_si
905
894
906
895
return _pal.set_csrk (*pcsrk, local_sign_counter);
907
896
}
908
- #endif // BLE_FEATURE_SIGNING
909
897
910
898
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
911
899
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::get_random_data(uint8_t *buffer, size_t size) {
@@ -1020,7 +1008,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::set_ltk_cb(
1020
1008
}
1021
1009
}
1022
1010
1023
- #if BLE_FEATURE_SIGNING
1024
1011
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1025
1012
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::set_peer_csrk_cb(
1026
1013
SecurityDb::entry_handle_t db_entry,
@@ -1066,7 +1053,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::return_csrk_cb
1066
1053
flags->csrk_mitm_protected
1067
1054
);
1068
1055
}
1069
- #endif // BLE_FEATURE_SIGNING
1070
1056
1071
1057
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1072
1058
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::update_oob_presence(connection_handle_t connection) {
@@ -1190,7 +1176,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_security_en
1190
1176
#endif // BLE_FEATURE_PRIVACY
1191
1177
}
1192
1178
1193
- #if BLE_FEATURE_PRIVACY
1194
1179
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1195
1180
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_identity_list_retrieved(
1196
1181
ble::ArrayView<SecurityEntryIdentity_t>& identity_list,
@@ -1211,8 +1196,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_identity_li
1211
1196
1212
1197
delete [] identity_list.data ();
1213
1198
}
1214
- #endif // BLE_FEATURE_PRIVACY
1215
-
1216
1199
1217
1200
/* Implements ble::pal::SecurityManagerEventHandler */
1218
1201
@@ -1310,7 +1293,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_valid_mic_t
1310
1293
(void )connection;
1311
1294
}
1312
1295
1313
- #if BLE_FEATURE_SIGNING
1314
1296
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1315
1297
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_signed_write_received_(
1316
1298
connection_handle_t connection,
@@ -1355,7 +1337,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_signed_writ
1355
1337
MBED_ASSERT (_db);
1356
1338
_db->set_local_sign_counter (_db->get_local_sign_counter () + 1 );
1357
1339
}
1358
- #endif // BLE_FEATURE_SIGNING
1359
1340
1360
1341
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1361
1342
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_slave_security_request_(
@@ -1644,7 +1625,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distri
1644
1625
_db->set_entry_local_ediv_rand (cb->db_entry , ediv, rand);
1645
1626
}
1646
1627
1647
- #if BLE_FEATURE_PRIVACY
1648
1628
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1649
1629
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distributed_irk_(
1650
1630
connection_handle_t connection,
@@ -1663,7 +1643,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distri
1663
1643
1664
1644
_db->set_entry_peer_irk (cb->db_entry , irk);
1665
1645
}
1666
- #endif // BLE_FEATURE_PRIVACY
1667
1646
1668
1647
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1669
1648
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distributed_bdaddr_(
@@ -1684,7 +1663,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distri
1684
1663
);
1685
1664
}
1686
1665
1687
- #if BLE_FEATURE_SIGNING
1688
1666
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1689
1667
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distributed_csrk_(
1690
1668
connection_handle_t connection,
@@ -1710,7 +1688,6 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_keys_distri
1710
1688
flags->csrk_mitm_protected
1711
1689
);
1712
1690
}
1713
- #endif // BLE_FEATURE_SIGNING
1714
1691
1715
1692
template <template <class > class TPalSecurityManager , template <class > class SigningMonitor >
1716
1693
void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::on_ltk_request_(
@@ -1849,4 +1826,3 @@ void GenericSecurityManager<TPalSecurityManager, SigningMonitor>::release_contro
1849
1826
} /* namespace generic */
1850
1827
} /* namespace ble */
1851
1828
1852
- #endif // BLE_FEATURE_SECURITY
0 commit comments