diff --git a/arm9/source/crypto/keydb.c b/arm9/source/crypto/keydb.c index c5ea72e..3b41d68 100644 --- a/arm9/source/crypto/keydb.c +++ b/arm9/source/crypto/keydb.c @@ -226,25 +226,3 @@ u32 InitKeyDb(const char* path) free(keydb); return (nkeys) ? 0 : 1; } - -// creates dependency to "sha.h", not required for base keydb functions -u32 CheckRecommendedKeyDb(const char* path) -{ - // SHA-256 of the recommended aeskeydb.bin file - // equals MD5 A5B28945A7C051D7A0CD18AF0E580D1B - static const u8 recommended_sha[0x20] = { - 0x40, 0x76, 0x54, 0x3D, 0xA3, 0xFF, 0x91, 0x1C, 0xE1, 0xCC, 0x4E, 0xC7, 0x2F, 0x92, 0xE4, 0xB7, - 0x2B, 0x24, 0x00, 0x15, 0xBE, 0x9B, 0xFC, 0xDE, 0x7F, 0xED, 0x95, 0x1D, 0xD5, 0xAB, 0x2D, 0xCB - }; - - // try to load aeskeydb.bin file - AesKeyInfo* keydb = (AesKeyInfo*) malloc(STD_BUFFER_SIZE); - if (!keydb) return 1; - u32 nkeys = LoadKeyDb(path, keydb, STD_BUFFER_SIZE); - - // compare with recommended SHA - bool res = (nkeys && (sha_cmp(recommended_sha, keydb, nkeys * sizeof(AesKeyInfo), SHA256_MODE) == 0)); - - free(keydb); - return res ? 0 : 1; -} diff --git a/arm9/source/crypto/keydb.h b/arm9/source/crypto/keydb.h index 48e56d2..429d027 100644 --- a/arm9/source/crypto/keydb.h +++ b/arm9/source/crypto/keydb.h @@ -30,4 +30,3 @@ u32 GetUnitKeysType(void); void CryptAesKeyInfo(AesKeyInfo* info); u32 LoadKeyFromFile(void* key, u32 keyslot, char type, char* id); u32 InitKeyDb(const char* path); -u32 CheckRecommendedKeyDb(const char* path); diff --git a/arm9/source/godmode.c b/arm9/source/godmode.c index 18ca31a..5595491 100644 --- a/arm9/source/godmode.c +++ b/arm9/source/godmode.c @@ -2299,11 +2299,6 @@ u32 GodMode(int entrypoint) { } } - // check aeskeydb.bin / key state - if ((entrypoint != ENTRY_B9S) && (CheckRecommendedKeyDb(NULL) != 0)) { - ShowPrompt(false, "WARNING:\nNot running from a boot9strap\ncompatible entrypoint. Not\neverything may work as expected.\n \nProvide the recommended\naeskeydb.bin file to make this\nwarning go away."); - } - #if defined(SALTMODE) show_splash = bootmenu = (bootloader && CheckButton(BOOTMENU_KEY)); if (show_splash) SplashInit("saltmode");