From c4cf6d6d26b4a3c272fefe88889422c34317bbd4 Mon Sep 17 00:00:00 2001 From: Supreet Deshpande Date: Fri, 18 Dec 2020 14:14:42 +0530 Subject: [PATCH] Secure boot v2: Fixes the issue of passing the flash calculated digest for ota verification. --- components/bootloader_support/src/idf/secure_boot_signatures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bootloader_support/src/idf/secure_boot_signatures.c b/components/bootloader_support/src/idf/secure_boot_signatures.c index 03533a0e46..77cd29c3c2 100644 --- a/components/bootloader_support/src/idf/secure_boot_signatures.c +++ b/components/bootloader_support/src/idf/secure_boot_signatures.c @@ -313,7 +313,7 @@ esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signa } ret = mbedtls_rsa_rsassa_pss_verify( &pk, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA256, DIGEST_LEN, - sig_block->block[i].image_digest, sig_be); + image_digest, sig_be); if (ret != 0) { ESP_LOGE(TAG, "Failed mbedtls_rsa_rsassa_pss_verify, err: %d", ret); } else {