mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 22:13:34 +08:00
Take the crypto_backend library into use in bootloader for signature verification
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
0d4f481035
commit
d83033f449
@@ -40,9 +40,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BOOTLOADER_USE_TOC
|
||||
|
||||
#ifdef BOOTLOADER_USE_SECURITY
|
||||
/* Using security always needs TOC (but TOC could be used without security) */
|
||||
#if defined(BOOTLOADER_USE_SECURITY)
|
||||
# define BOOTLOADER_USE_TOC
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -55,6 +55,8 @@ bool decrypt_app(uint16_t idx, const image_toc_entry_t *toc_entries);
|
||||
|
||||
#else
|
||||
|
||||
# if defined(BOOTLOADER_USE_TOC)
|
||||
|
||||
/* No security, application verification passes always */
|
||||
|
||||
static inline bool verify_app(uint16_t idx, const image_toc_entry_t *toc_entries) {return true;}
|
||||
@@ -63,6 +65,6 @@ static inline bool verify_app(uint16_t idx, const image_toc_entry_t *toc_entries
|
||||
|
||||
static inline bool decrypt_app(uint16_t idx, const image_toc_entry_t *toc_entries) {return false;}
|
||||
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
#endif // BOOTLOADER_USE_SECURITY
|
||||
|
||||
Reference in New Issue
Block a user