-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boot/bootutil: Split private image API out of image.h
image.h will now only contain applicaiton image related structures and defines. The split has been done to reduce need for including extra headers, for example FIH support and mcuboot_config.h into software that needs the same defining as MCUboot but implements own functions. Signed-off-by: Dominik Ermel <[email protected]>
- Loading branch information
Showing
4 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2016-2019 Linaro LTD | ||
* Copyright (c) 2016-2019 JUUL Labs | ||
* Copyright (c) 2019-2023 Arm Limited | ||
* Copyright (c) 2023 Nordic Semiconductor ASA | ||
* | ||
* Original license: | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
#ifndef H_IMAGE_API_PRIV_ | ||
#define H_IMAGE_API_PRIV_ | ||
|
||
#include <inttypes.h> | ||
#include <stdbool.h> | ||
#include <bootutil/image.h> | ||
#include <bootutil/fault_injection_hardening.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct enc_key_data; | ||
fih_ret bootutil_img_validate(struct enc_key_data *enc_state, int image_index, | ||
struct image_header *hdr, | ||
const struct flash_area *fap, | ||
uint8_t *tmp_buf, uint32_t tmp_buf_sz, | ||
uint8_t *seed, int seed_len, uint8_t *out_hash); | ||
|
||
int bootutil_tlv_iter_begin(struct image_tlv_iter *it, | ||
const struct image_header *hdr, | ||
const struct flash_area *fap, uint16_t type, | ||
bool prot); | ||
int bootutil_tlv_iter_next(struct image_tlv_iter *it, uint32_t *off, | ||
uint16_t *len, uint16_t *type); | ||
|
||
int32_t bootutil_get_img_security_cnt(struct image_header *hdr, | ||
const struct flash_area *fap, | ||
uint32_t *security_cnt); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters