|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Private strict RBKC validator seam for media downloader artifacts. More...
#include <stdint.h>#include "fw_if_fs.h"#include "mdl_export.h"#include "mdl_verify.h"#include "ra8_attributes.h"#include "ra8_err.h"Go to the source code of this file.
Functions | |
| ra8_err_t | priv_mdl_verify_rabook (fw_fs_file_t *file, uint64_t size_bytes, mdl_export_workspace_t *workspace, mdl_verify_report_t *report) |
| Strictly validate one borrowed RBKC .rabook file. | |
Private strict RBKC validator seam for media downloader artifacts.
Keeps the caller-workspace RBKC reader behind the downloader's borrowed-file verifier contract. No filesystem path, allocation, or publication policy crosses this seam.
Definition in file mdl_verify_rabook_internal.h.
| ra8_err_t priv_mdl_verify_rabook | ( | fw_fs_file_t * | file, |
| uint64_t | size_bytes, | ||
| mdl_export_workspace_t * | workspace, | ||
| mdl_verify_report_t * | report ) |
Strictly validate one borrowed RBKC .rabook file.
Opens the callback-driven chunk reader, validates every compressed stream and the complete inner RABOOK1 structure/CRC, then reports bounded chapter and image counts.
| [in,out] | file | Borrowed readable and seekable file. |
| [in] | size_bytes | Immutable complete file extent. |
| [in,out] | workspace | Exclusive caller-owned validation arena. |
| [out] | report | Candidate report populated only on success. |
| k_ra8_ok | Every outer and inner byte passed strict validation. |
| k_ra8_err_invalid_size | A wire or caller-workspace bound was exceeded. |
| k_ra8_err_validation_failed | A zlib stream or RABOOK1 structure failed. |
file remains open for the call. workspace was reset by the owning verifier and is exclusively mutable. report. Definition at line 120 of file mdl_verify_rabook.c.
References book_header_t::author_off, book_chunked_open(), book_chunked_validate_strict(), book_header_t::chapter_count, book_header_t::identifier_off, book_header_t::image_count, internal_rabook_inflate(), internal_rabook_read(), k_ra8_err_invalid_arg, k_ra8_err_invalid_size, k_ra8_ok, k_rabook_chunk_bytes, k_rabook_compressed_bytes, k_rabook_scratch_bytes, k_rabook_table_entries, mdl_export_workspace_take(), RA8_PRIV, and book_header_t::title_off.
Referenced by internal_verify_borrowed().