Replaced the signature key used for EIP712 tests by the CAL testing one
This commit is contained in:
7
Makefile
7
Makefile
@@ -145,7 +145,12 @@ endif
|
||||
# EIP-712
|
||||
ifneq ($(TARGET_NAME),TARGET_NANOS)
|
||||
DEFINES += HAVE_EIP712_FULL_SUPPORT
|
||||
DEFINES += HAVE_EIP712_TESTING_KEY
|
||||
endif
|
||||
|
||||
# CryptoAssetsList testing key
|
||||
CAL_TESTING_KEY:=0
|
||||
ifneq ($(CAL_TESTING_KEY),0)
|
||||
DEFINES += HAVE_CAL_TESTING_KEY
|
||||
endif
|
||||
|
||||
# Enabling debug PRINTF
|
||||
|
||||
@@ -44,7 +44,7 @@ extern tokenDefinition_t const TOKENS_EXTRA[NUM_TOKENS_EXTRA];
|
||||
#ifndef HAVE_TOKENS_LIST
|
||||
|
||||
static const uint8_t LEDGER_SIGNATURE_PUBLIC_KEY[] = {
|
||||
#ifndef LEDGER_TEST_PUBLIC_KEY
|
||||
#ifndef HAVE_CAL_TESTING_KEY
|
||||
// production key 2019-01-11 03:07PM (erc20signer)
|
||||
0x04, 0x5e, 0x6c, 0x10, 0x20, 0xc1, 0x4d, 0xc4, 0x64, 0x42, 0xfe, 0x89, 0xf9, 0x7c,
|
||||
0x0b, 0x68, 0xcd, 0xb1, 0x59, 0x76, 0xdc, 0x24, 0xf2, 0x4c, 0x31, 0x6e, 0x7b, 0x30,
|
||||
|
||||
@@ -10,15 +10,6 @@
|
||||
#include "path.h"
|
||||
#include "ui_logic.h"
|
||||
|
||||
#ifdef HAVE_EIP712_TESTING_KEY
|
||||
static const uint8_t EIP712_FEEDER_PUBLIC_KEY[] = {
|
||||
0x04, 0x4c, 0xca, 0x8f, 0xad, 0x49, 0x6a, 0xa5, 0x04, 0x0a, 0x00, 0xa7, 0xeb,
|
||||
0x2f, 0x5c, 0xc3, 0xb8, 0x53, 0x76, 0xd8, 0x8b, 0xa1, 0x47, 0xa7, 0xd7, 0x05,
|
||||
0x4a, 0x99, 0xc6, 0x40, 0x56, 0x18, 0x87, 0xfe, 0x17, 0xa0, 0x96, 0xe3, 0x6c,
|
||||
0x3b, 0x52, 0x3b, 0x24, 0x4f, 0x3e, 0x2f, 0xf7, 0xf8, 0x40, 0xae, 0x26, 0xc4,
|
||||
0xe7, 0x7a, 0xd3, 0xbc, 0x73, 0x9a, 0xf5, 0xde, 0x6f, 0x2d, 0x77, 0xa7, 0xb6};
|
||||
#endif // HAVE_EIP712_TESTING_KEY
|
||||
|
||||
/**
|
||||
* Reconstruct the field path and hash it
|
||||
*
|
||||
@@ -99,13 +90,8 @@ static bool verify_filtering_signature(uint8_t dname_length,
|
||||
cx_hash((cx_hash_t *) &hash_ctx, CX_LAST, NULL, 0, hash, INT256_LENGTH);
|
||||
|
||||
cx_ecfp_init_public_key(CX_CURVE_256K1,
|
||||
#ifdef HAVE_EIP712_TESTING_KEY
|
||||
EIP712_FEEDER_PUBLIC_KEY,
|
||||
sizeof(EIP712_FEEDER_PUBLIC_KEY),
|
||||
#else
|
||||
LEDGER_SIGNATURE_PUBLIC_KEY,
|
||||
sizeof(LEDGER_SIGNATURE_PUBLIC_KEY),
|
||||
#endif
|
||||
&verifying_key);
|
||||
if (!cx_ecdsa_verify(&verifying_key, CX_LAST, CX_SHA256, hash, sizeof(hash), sig, sig_length)) {
|
||||
#ifndef HAVE_BYPASS_SIGNATURES
|
||||
|
||||
Reference in New Issue
Block a user