test key + disable bls sigs

This commit is contained in:
TamtamHero
2021-05-07 15:48:27 +02:00
committed by pscott
parent e2fa7ccaf9
commit ec1a0d1128
3 changed files with 12 additions and 3 deletions

View File

@@ -31,8 +31,8 @@ void handleSetExternalPlugin(uint8_t p1,
// check Ledger's signature over the payload
cx_hash_sha256(workBuffer, payload_size, hash, sizeof(hash));
cx_ecfp_init_public_key(CX_CURVE_256K1,
LEDGER_SIGNATURE_PUBLIC_KEY,
sizeof(LEDGER_SIGNATURE_PUBLIC_KEY),
LEDGER_PLUGINS_SIGNATURE_PUBLIC_KEY,
sizeof(LEDGER_PLUGINS_SIGNATURE_PUBLIC_KEY),
&tokenKey);
if(!cx_ecdsa_verify(&tokenKey, CX_LAST, CX_SHA256, hash, sizeof(hash), workBuffer+payload_size, dataLength-payload_size)){
PRINTF("Invalid external plugin signature %.*H\n", payload_size, workBuffer);