mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-16 16:14:25 -04:00
exo2: implement through boot config load/validate
This commit is contained in:
parent
cbcd1d87fb
commit
e11fad6598
26 changed files with 688 additions and 49 deletions
|
@ -14,9 +14,21 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <exosphere.hpp>
|
||||
#include "secmon_boot.hpp"
|
||||
|
||||
namespace ams::secmon::boot {
|
||||
|
||||
/* TODO */
|
||||
bool VerifyBootConfigSignature(pkg1::BootConfig &bc, const void *mod, size_t mod_size) {
|
||||
return VerifySignature(std::addressof(bc.signature), sizeof(bc.signature), mod, mod_size, std::addressof(bc.signed_data), sizeof(bc.signed_data));
|
||||
}
|
||||
|
||||
}
|
||||
bool VerifyBootConfigEcid(const pkg1::BootConfig &bc) {
|
||||
/* Get the ecid. */
|
||||
br::BootEcid ecid;
|
||||
fuse::GetEcid(std::addressof(ecid));
|
||||
|
||||
/* Verify it matches. */
|
||||
return crypto::IsSameBytes(std::addressof(ecid), bc.signed_data.ecid, sizeof(ecid));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue