mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
updater: add test for update flow
currently windows-only
This commit is contained in:
@ -38,6 +38,10 @@
|
||||
const std::array<u8, 32> UPDATE_PUB_KEY = {
|
||||
0x2a, 0xb3, 0xd1, 0xdc, 0x6e, 0xf5, 0x07, 0xf6, 0xa0, 0x6c, 0x7c, 0x54, 0xdf, 0x54, 0xf4, 0x42,
|
||||
0x80, 0xa6, 0x28, 0x8b, 0x6d, 0x70, 0x14, 0xb5, 0x4c, 0x34, 0x95, 0x20, 0x4d, 0xd4, 0xd3, 0x5d};
|
||||
// The private key for UPDATE_PUB_KEY_TEST is in Tools/test-updater.py
|
||||
const std::array<u8, 32> UPDATE_PUB_KEY_TEST = {
|
||||
0x0c, 0x5f, 0xdc, 0xd1, 0x15, 0x71, 0xfb, 0x86, 0x4f, 0x9e, 0x6d, 0xe6, 0x65, 0x39, 0x43, 0xe1,
|
||||
0x9e, 0xe0, 0x9b, 0x28, 0xc9, 0x1a, 0x60, 0xb7, 0x67, 0x1c, 0xf3, 0xf6, 0xca, 0x1b, 0xdd, 0x1a};
|
||||
|
||||
// Where to log updater output.
|
||||
static FILE* log_fp = stderr;
|
||||
@ -163,8 +167,9 @@ bool VerifySignature(const std::string& data, const std::string& b64_signature)
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& pub_key = UI::IsTestMode() ? UPDATE_PUB_KEY_TEST : UPDATE_PUB_KEY;
|
||||
return ed25519_verify(signature, reinterpret_cast<const u8*>(data.data()), data.size(),
|
||||
UPDATE_PUB_KEY.data());
|
||||
pub_key.data());
|
||||
}
|
||||
|
||||
void FlushLog()
|
||||
|
Reference in New Issue
Block a user