this commit refactors the signature checks. First we introduce a common pm3 generic private / public key pair in order to allow for users to self sign their own modded device. The verification checks now looks at both hard coded public keys. If a vendor wants to add their own public key thus allowing for a simple way for us to identify their devices they can now do so. The downside is that the firmware mismatch detection becomes a bit dodgy. mem info; mem info -v; mem info -s -p <filename.pem>; mem info -s -p <filename.pem> -w contains the changes. OBS! when -w be careful to not overwrite your genuine RDV4 signature. As always, with great power comes great responsibility

This commit is contained in:
iceman1001 committed 2025-09-25 19:44:36 +02:00
1 parent 1412b6882b
commit b097e10aa3
11 files changed
+340 -178

No files matched your search

+8 -3
View File
@@ -43,9 +43,13 @@ static uint32_t FLASHMEM_SPIBAUDRATE = FLASH_BAUD;
#ifndef AS_BOOTROM
spi_flash_t spi_flash_data = {0};
uint8_t spi_flash_pages64k = 4;
static spi_flash_t spi_flash_data = {0};
spi_flash_t *flash_get_info(void) {
return &spi_flash_data;
}
void FlashmemSetSpiBaudrate(uint32_t baudrate) {
FLASHMEM_SPIBAUDRATE = baudrate;
@@ -387,7 +391,7 @@ void Flashmem_print_status(void) {
);
}
Dbprintf(" Memory size............. " _YELLOW_("%d kB (%d pages * 64k)"), spi_flash_pages64k * 64, spi_flash_pages64k);
Dbprintf(" Memory size............. " _YELLOW_("%d Kb") " ( %d pages * 64k )", spi_flash_pages64k * 64, spi_flash_pages64k);
uint8_t uid[8] = {0, 0, 0, 0, 0, 0, 0, 0};
Flash_UniqueID(uid);
@@ -439,6 +443,7 @@ bool FlashDetect(void) {
}
}
spi_flash_data.pages64k = spi_flash_pages64k;
return ret;
}