Display the data being signed
This commit is contained in:
@@ -278,9 +278,9 @@ static void processV(txContext_t *context) {
|
||||
}
|
||||
|
||||
|
||||
static parserStatus_e processTxInternal(txContext_t *context, uint32_t processingFlags) {
|
||||
static parserStatus_e processTxInternal(txContext_t *context) {
|
||||
for (;;) {
|
||||
bool processedCustom = false;
|
||||
customStatus_e customStatus = CUSTOM_NOT_HANDLED;
|
||||
// EIP 155 style transasction
|
||||
if (context->currentField == TX_RLP_DONE) {
|
||||
return USTREAM_FINISHED;
|
||||
@@ -341,13 +341,26 @@ static parserStatus_e processTxInternal(txContext_t *context, uint32_t processin
|
||||
context->processingField = true;
|
||||
}
|
||||
if (context->customProcessor != NULL) {
|
||||
processedCustom = context->customProcessor(context);
|
||||
customStatus = context->customProcessor(context);
|
||||
switch(customStatus) {
|
||||
case CUSTOM_NOT_HANDLED:
|
||||
case CUSTOM_HANDLED:
|
||||
break;
|
||||
case CUSTOM_SUSPENDED:
|
||||
return USTREAM_SUSPENDED;
|
||||
case CUSTOM_FAULT:
|
||||
PRINTF("Custom processor aborted\n");
|
||||
return USTREAM_FAULT;
|
||||
default:
|
||||
PRINTF("Unhandled custom processor status\n");
|
||||
return USTREAM_FAULT;
|
||||
}
|
||||
}
|
||||
if (!processedCustom) {
|
||||
if (customStatus == CUSTOM_NOT_HANDLED) {
|
||||
switch (context->currentField) {
|
||||
case TX_RLP_CONTENT:
|
||||
processContent(context);
|
||||
if ((processingFlags & TX_FLAG_TYPE) == 0) {
|
||||
if ((context->processingFlags & TX_FLAG_TYPE) == 0) {
|
||||
context->currentField++;
|
||||
}
|
||||
break;
|
||||
@@ -392,7 +405,8 @@ parserStatus_e processTx(txContext_t *context, uint8_t *buffer,
|
||||
TRY {
|
||||
context->workBuffer = buffer;
|
||||
context->commandLength = length;
|
||||
result = processTxInternal(context, processingFlags);
|
||||
context->processingFlags = processingFlags;
|
||||
result = processTxInternal(context);
|
||||
}
|
||||
CATCH_OTHER(e) {
|
||||
result = USTREAM_FAULT;
|
||||
@@ -403,3 +417,19 @@ parserStatus_e processTx(txContext_t *context, uint8_t *buffer,
|
||||
END_TRY;
|
||||
return result;
|
||||
}
|
||||
|
||||
parserStatus_e continueTx(txContext_t *context) {
|
||||
parserStatus_e result;
|
||||
BEGIN_TRY {
|
||||
TRY {
|
||||
result = processTxInternal(context);
|
||||
}
|
||||
CATCH_OTHER(e) {
|
||||
result = USTREAM_FAULT;
|
||||
}
|
||||
FINALLY {
|
||||
}
|
||||
}
|
||||
END_TRY;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user