mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
sm: drop SC Auth Req Flag if ENABLE_LE_SECURE_CONNECTIONS is not defined
This commit is contained in:
parent
9635072ee4
commit
98d95509d1
@ -808,6 +808,7 @@ static void sm_setup_tk(void){
|
||||
#else
|
||||
setup->sm_use_secure_connections = 0;
|
||||
#endif
|
||||
log_info("Secure pairing: %u", setup->sm_use_secure_connections);
|
||||
|
||||
// If both devices have not set the MITM option in the Authentication Requirements
|
||||
// Flags, then the IO capabilities shall be ignored and the Just Works association
|
||||
@ -3873,6 +3874,12 @@ void sm_set_encryption_key_size_range(uint8_t min_size, uint8_t max_size){
|
||||
}
|
||||
|
||||
void sm_set_authentication_requirements(uint8_t auth_req){
|
||||
#ifndef ENABLE_LE_SECURE_CONNECTIONS
|
||||
if (auth_req & SM_AUTHREQ_SECURE_CONNECTION){
|
||||
log_error("ENABLE_LE_SECURE_CONNECTIONS not defined, but requested by app. Dropping SC flag");
|
||||
auth_req &= ~SM_AUTHREQ_SECURE_CONNECTION;
|
||||
}
|
||||
#endif
|
||||
sm_auth_req = auth_req;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user