Commit cf97dd08 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files

encryption: changed boot_enc_valid() return value to bool

boot_enc_valid() is supposed to return boolena so
changed it return type in order to reflect this.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent e575fe9e
Loading
Loading
Loading
Loading
+2 −1
Changes for boot/bootutil/include/bootutil/enc_key.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#ifndef BOOTUTIL_ENC_KEY_H
#define BOOTUTIL_ENC_KEY_H

#include <stdbool.h>
#include <flash_map_backend/flash_map_backend.h>
#include "mcuboot_config/mcuboot_config.h"
#include "bootutil/image.h"
@@ -51,7 +52,7 @@ extern const struct bootutil_key bootutil_enc_key;
int boot_enc_set_key(uint8_t slot, uint8_t *enckey);
int boot_enc_load(const struct image_header *hdr, const struct flash_area *fap,
        uint8_t *enckey);
int boot_enc_valid(const struct flash_area *fap);
bool boot_enc_valid(const struct flash_area *fap);
void boot_encrypt(const struct flash_area *fap, uint32_t off, uint32_t sz,
        uint32_t blk_off, uint8_t *buf);
void boot_enc_zeroize(void);
+2 −2
Changes for boot/bootutil/src/encrypted.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ boot_enc_load(const struct image_header *hdr, const struct flash_area *fap,
    return rc;
}

int
bool
boot_enc_valid(const struct flash_area *fap)
{
    int rc;
@@ -315,7 +315,7 @@ boot_enc_valid(const struct flash_area *fap)
    if (rc < 0) {
        /* can't get proper slot number - skip encryption, */
        /* postpone the erro for a upper layer */
        return 0;
        return false;
    }

    return enc_state[rc].valid;