We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0065f8 commit 687dc8cCopy full SHA for 687dc8c
boot/bootutil/src/encrypted.c
@@ -557,18 +557,15 @@ boot_decrypt_key(const uint8_t *buf, uint8_t *enckey)
557
558
/* Assumes the tag buffer is at least sizeof(hmac_tag_size(state)) bytes */
559
rc = bootutil_hmac_sha256_finish(&hmac, tag, BOOTUTIL_CRYPTO_SHA256_DIGEST_SIZE);
560
+ (void)bootutil_hmac_sha256_drop(&hmac);
561
if (rc != 0) {
- (void)bootutil_hmac_sha256_drop(&hmac);
562
return -1;
563
}
564
565
if (bootutil_constant_time_compare(tag, &buf[EC_TAG_INDEX], 32) != 0) {
566
567
568
569
570
- bootutil_hmac_sha256_drop(&hmac);
571
-
572
/*
573
* Finally decrypt the received ciphered key
574
*/
0 commit comments