diff --git a/src/platform/ESP32/ESP32CHIPCryptoPAL.cpp b/src/platform/ESP32/ESP32CHIPCryptoPAL.cpp index 72bdd376ae98eb..8efc2e56d3c154 100644 --- a/src/platform/ESP32/ESP32CHIPCryptoPAL.cpp +++ b/src/platform/ESP32/ESP32CHIPCryptoPAL.cpp @@ -19,13 +19,13 @@ #include #include +#include #include #include #include #include #include #include -#include // In mbedTLS 3.0.0 direct access to structure fields was replaced with using MBEDTLS_PRIVATE macro. #if (MBEDTLS_VERSION_NUMBER >= 0x03000000) @@ -84,7 +84,7 @@ CHIP_ERROR ESP32P256Keypair::Initialize(ECPKeyTarget keyTarget, int efuseBlock) VerifyOrExit(status == 0, error = CHIP_ERROR_INTERNAL); mInitialized = true; - ecdsa_ctx = nullptr; + ecdsa_ctx = nullptr; return error; exit: diff --git a/src/platform/ESP32/ESP32SecureCertDACProvider.cpp b/src/platform/ESP32/ESP32SecureCertDACProvider.cpp index 4a283389069dae..160d9f619b1125 100644 --- a/src/platform/ESP32/ESP32SecureCertDACProvider.cpp +++ b/src/platform/ESP32/ESP32SecureCertDACProvider.cpp @@ -127,10 +127,10 @@ CHIP_ERROR ESP32SecureCertDACProvider ::SignWithDeviceAttestationKey(const ByteS esp_err = esp_secure_cert_get_priv_key_type(&keyType); VerifyOrReturnError(esp_err == ESP_OK, CHIP_ERROR_INCORRECT_STATE, - ESP_LOGE(TAG, "Failed to get the type of private key from secure cert partition, esp_err:%d", esp_err)); + ESP_LOGE(TAG, "Failed to get the type of private key from secure cert partition, esp_err:%d", esp_err)); VerifyOrReturnError(keyType != ESP_SECURE_CERT_INVALID_KEY, CHIP_ERROR_INCORRECT_STATE, - ESP_LOGE(TAG, "Private key type in secure cert partition in invalid")); + ESP_LOGE(TAG, "Private key type in secure cert partition in invalid")); // This flow is for devices supporting ECDSA peripheral if (keyType == ESP_SECURE_CERT_ECDSA_PERIPHERAL_KEY) @@ -141,17 +141,18 @@ CHIP_ERROR ESP32SecureCertDACProvider ::SignWithDeviceAttestationKey(const ByteS esp_err = esp_secure_cert_get_priv_key_efuse_id(&efuseBlockId); VerifyOrReturnError(esp_err == ESP_OK, CHIP_ERROR_INVALID_KEY_ID, - ESP_LOGE(TAG, "Failed to get the private key efuse block id, esp_err:%d", esp_err)); + ESP_LOGE(TAG, "Failed to get the private key efuse block id, esp_err:%d", esp_err)); ESP_LOGD(TAG, "efuse block id:%u", efuseBlockId); chipError = keypair.Initialize(chip::Crypto::ECPKeyTarget::ECDSA, efuseBlockId); VerifyOrReturnError(chipError == CHIP_NO_ERROR, chipError, - ESP_LOGE(TAG, "Failed to initialize the keypair err:%" CHIP_ERROR_FORMAT, chipError.Format())); + ESP_LOGE(TAG, "Failed to initialize the keypair err:%" CHIP_ERROR_FORMAT, chipError.Format())); chipError = keypair.ECDSA_sign_msg(messageToSign.data(), messageToSign.size(), signature); - VerifyOrReturnError(chipError == CHIP_NO_ERROR, chipError, - ESP_LOGE(TAG, "Failed to sign with device attestation key, err:%" CHIP_ERROR_FORMAT, chipError.Format())); + VerifyOrReturnError( + chipError == CHIP_NO_ERROR, chipError, + ESP_LOGE(TAG, "Failed to sign with device attestation key, err:%" CHIP_ERROR_FORMAT, chipError.Format())); #else return CHIP_ERROR_INCORRECT_STATE; #endif // CONFIG_SOC_ECDSA_SUPPORTED @@ -164,7 +165,7 @@ CHIP_ERROR ESP32SecureCertDACProvider ::SignWithDeviceAttestationKey(const ByteS esp_err = esp_secure_cert_get_priv_key(&sc_keypair, &sc_keypair_len); VerifyOrReturnError(esp_err == ESP_OK && sc_keypair != NULL && sc_keypair_len != 0, CHIP_ERROR_INCORRECT_STATE, - ESP_LOGE(TAG, "esp_secure_cert_get_priv_key failed esp_err:%d", esp_err)); + ESP_LOGE(TAG, "esp_secure_cert_get_priv_key failed esp_err:%d", esp_err)); ESP_FAULT_ASSERT(esp_err == ESP_OK && sc_keypair != NULL && sc_keypair_len != 0);