sm: fix warnings

This commit is contained in:
Matthias Ringwald 2018-12-04 10:25:00 +01:00
parent 899e6e028a
commit 21045273fa

View File

@ -508,7 +508,7 @@ static void sm_truncate_key(sm_key_t key, int max_encryption_size){
} }
// ER / IR checks // ER / IR checks
static int sm_er_ir_set_default(void){ static void sm_er_ir_set_default(void){
int i; int i;
for (i=0;i<16;i++){ for (i=0;i<16;i++){
sm_persistent_er[i] = 0x30 + i; sm_persistent_er[i] = 0x30 + i;
@ -2923,8 +2923,10 @@ static void sm_validate_er_ir(void){
warning = 1; warning = 1;
log_error("Persistent ER not set with sm_set_er. Legacy Pairing LTK is not secure"); log_error("Persistent ER not set with sm_set_er. Legacy Pairing LTK is not secure");
} }
if (warning) {
log_error("Please configure btstack_tlv to let BTstack setup ER and IR keys"); log_error("Please configure btstack_tlv to let BTstack setup ER and IR keys");
} }
}
static void sm_handle_random_result_ir(void *arg){ static void sm_handle_random_result_ir(void *arg){
sm_persistent_keys_random_active = 0; sm_persistent_keys_random_active = 0;