diff --git a/client/src/ledger_app_clients/ethereum/client.py b/client/src/ledger_app_clients/ethereum/client.py index 2ef41ff..6981f86 100644 --- a/client/src/ledger_app_clients/ethereum/client.py +++ b/client/src/ledger_app_clients/ethereum/client.py @@ -222,7 +222,7 @@ class EthAppClient: tmp = self._cmd_builder.set_external_plugin(plugin_name, contract_address, method_selelector, bytes()) # skip APDU header & empty sig - sig = sign_data(Key.SET_PLUGIN, tmp[5:-1]) + sig = sign_data(Key.CAL, tmp[5:]) return self._send(self._cmd_builder.set_external_plugin(plugin_name, contract_address, method_selelector, sig)) def personal_sign(self, path: str, msg: bytes): diff --git a/src_features/setExternalPlugin/cmd_setExternalPlugin.c b/src_features/setExternalPlugin/cmd_setExternalPlugin.c index 4a94356..49e827a 100644 --- a/src_features/setExternalPlugin/cmd_setExternalPlugin.c +++ b/src_features/setExternalPlugin/cmd_setExternalPlugin.c @@ -48,7 +48,9 @@ void handleSetExternalPlugin(uint8_t p1, workBuffer + payload_size, dataLength - payload_size)) { #ifndef HAVE_BYPASS_SIGNATURES - PRINTF("Invalid plugin signature %.*H\n", payload_size, workBuffer); + PRINTF("Invalid plugin signature %.*H\n", + dataLength - payload_size, + workBuffer + payload_size); THROW(0x6A80); #endif }