diff --git a/components/bt/common/api/include/api/esp_blufi_api.h b/components/bt/common/api/include/api/esp_blufi_api.h index b6f3fe295c..bcec29381b 100644 --- a/components/bt/common/api/include/api/esp_blufi_api.h +++ b/components/bt/common/api/include/api/esp_blufi_api.h @@ -76,9 +76,11 @@ typedef enum { ESP_BLUFI_READ_PARAM_ERROR, ESP_BLUFI_MAKE_PUBLIC_ERROR, ESP_BLUFI_DATA_FORMAT_ERROR, - ESP_BLUFI_CALC_SHA_256_ERROR, + // BLUFI_CALC_MD5 entry kept for backward compatibility + ESP_BLUFI_CALC_MD5_ERROR, ESP_BLUFI_WIFI_SCAN_FAIL, ESP_BLUFI_MSG_STATE_ERROR, + ESP_BLUFI_CALC_SHA_256_ERROR, } esp_blufi_error_state_t; /** diff --git a/examples/bluetooth/blufi/main/blufi_security.c b/examples/bluetooth/blufi/main/blufi_security.c index b775643ee5..bca615a1db 100644 --- a/examples/bluetooth/blufi/main/blufi_security.c +++ b/examples/bluetooth/blufi/main/blufi_security.c @@ -170,11 +170,11 @@ void blufi_dh_negotiate_data_handler(uint8_t *data, int len, uint8_t **output_da } /* Determine key bits based on public key length (RFC7919 key sizes) - * Note: Only 2048 and 3072 bit keys are supported due to buffer size constraints - * (DH_SELF_PUB_KEY_LEN = 384 bytes = 3072 bits maximum) */ + * Note: Only 3072 bit keys are supported due to buffer size constraints + * (DH_SELF_PUB_KEY_LEN = 384 bytes = 3072 bits) */ size_t key_bits = pub_len * 8; - if (key_bits != 2048 && key_bits != 3072) { - BLUFI_ERROR("Unsupported DH key length: %d bytes (only 2048 and 3072 bit keys supported)", pub_len); + if (key_bits != 3072) { + BLUFI_ERROR("Unsupported DH key length: %d bytes (only 3072 bit keys supported)", pub_len); btc_blufi_report_error(ESP_BLUFI_DH_PARAM_ERROR); return; } diff --git a/examples/bluetooth/blufi/sdkconfig.defaults b/examples/bluetooth/blufi/sdkconfig.defaults index 797047814d..31d7023d8b 100644 --- a/examples/bluetooth/blufi/sdkconfig.defaults +++ b/examples/bluetooth/blufi/sdkconfig.defaults @@ -14,4 +14,4 @@ CONFIG_BT_ENABLED=y CONFIG_BT_GATTC_ENABLE=n CONFIG_BT_BLE_SMP_ENABLE=n CONFIG_BT_BLE_BLUFI_ENABLE=y -CONFIG_MBEDTLS_HARDWARE_MPI=n +CONFIG_MBEDTLS_HARDWARE_MPI=y