mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-14 18:40:59 +00:00
Revert "sm: manage global signing counter"
This reverts commit 9f9b1721e11470e7d01a3673ec902fdf325c8da2.
This commit is contained in:
parent
7b8f2e5c7a
commit
db894f169e
10
ble/sm.c
10
ble/sm.c
@ -137,8 +137,6 @@ static derived_key_generation_t dkg_state;
|
||||
// derived from sm_persistent_er
|
||||
// ..
|
||||
|
||||
static uint32_t sm_signing_counter = 0;
|
||||
|
||||
// random address update
|
||||
static random_address_update_t rau_state;
|
||||
static bd_addr_t sm_random_address;
|
||||
@ -2227,14 +2225,6 @@ void sm_set_ir(sm_key_t ir){
|
||||
memcpy(sm_persistent_ir, ir, 16);
|
||||
}
|
||||
|
||||
void sm_set_signing_counter(uint32_t signing_counter){
|
||||
sm_signing_counter = signing_counter;
|
||||
}
|
||||
|
||||
uint32_t sm_signing_counter_next(void){
|
||||
return sm_signing_counter++;
|
||||
}
|
||||
|
||||
// Testing support only
|
||||
void sm_test_set_irk(sm_key_t irk){
|
||||
memcpy(sm_persistent_irk, irk, 16);
|
||||
|
13
ble/sm.h
13
ble/sm.h
@ -147,14 +147,6 @@ void sm_set_er(sm_key_t er);
|
||||
*/
|
||||
void sm_set_ir(sm_key_t ir);
|
||||
|
||||
/**
|
||||
* @brief Set signning counnter used with Connection Signature Resolving Key (CSRK)
|
||||
* @note Needs to be stored in persistent memory as a signed writes are invalid if a higher counter was
|
||||
* recevied before
|
||||
* @param signing counter
|
||||
*/
|
||||
void sm_set_signing_counter(uint32_t signing_counter);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Registers OOB Data Callback. The callback should set the oob_data and return 1 if OOB data is availble
|
||||
@ -271,11 +263,6 @@ void sm_authorization_grant(uint8_t addr_type, bd_addr_t address);
|
||||
int sm_cmac_ready(void);
|
||||
void sm_cmac_start(sm_key_t k, uint16_t message_len, uint8_t * message, uint32_t sign_counter, void (*done_handler)(uint8_t hash[8]));
|
||||
|
||||
/**
|
||||
* @brief Get global signing counter and increment it
|
||||
*/
|
||||
uint32_t sm_signing_counter_next(void);
|
||||
|
||||
/*
|
||||
* @brief Match address against bonded devices
|
||||
* @return 0 if successfully added to lookup queue
|
||||
|
Loading…
x
Reference in New Issue
Block a user