Loading system/stack/acl/btm_acl.cc +18 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include "main/shim/l2c_api.h" #include "main/shim/metrics_api.h" #include "main/shim/shim.h" #include "os/parameter_provider.h" #include "osi/include/allocator.h" #include "osi/include/log.h" #include "osi/include/osi.h" // UNUSED_ATTR Loading Loading @@ -676,6 +677,23 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status, return; } /* Common Criteria mode only: if we are trying to drop encryption on an * encrypted connection, drop the connection */ if (bluetooth::os::ParameterProvider::IsCommonCriteriaMode()) { if (p->is_encrypted && !encr_enable) { LOG(ERROR) << __func__ << " attempting to decrypt encrypted connection, disconnecting. " "handle: " << loghex(handle); acl_disconnect_from_handle(handle, HCI_ERR_HOST_REJECT_SECURITY, "stack::btu::btu_hcif::read_drop_encryption " "Connection Already Encrypted"); return; } } p->is_encrypted = encr_enable; /* Process Role Switch if active */ Loading Loading
system/stack/acl/btm_acl.cc +18 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include "main/shim/l2c_api.h" #include "main/shim/metrics_api.h" #include "main/shim/shim.h" #include "os/parameter_provider.h" #include "osi/include/allocator.h" #include "osi/include/log.h" #include "osi/include/osi.h" // UNUSED_ATTR Loading Loading @@ -676,6 +677,23 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status, return; } /* Common Criteria mode only: if we are trying to drop encryption on an * encrypted connection, drop the connection */ if (bluetooth::os::ParameterProvider::IsCommonCriteriaMode()) { if (p->is_encrypted && !encr_enable) { LOG(ERROR) << __func__ << " attempting to decrypt encrypted connection, disconnecting. " "handle: " << loghex(handle); acl_disconnect_from_handle(handle, HCI_ERR_HOST_REJECT_SECURITY, "stack::btu::btu_hcif::read_drop_encryption " "Connection Already Encrypted"); return; } } p->is_encrypted = encr_enable; /* Process Role Switch if active */ Loading