Skip to content

Commit

Permalink
Merge pull request #20346 from mguetschow/psa-crypto-ed25519-return
Browse files Browse the repository at this point in the history
sys/psa_crypto: return proper error code for psa_verify_msg
  • Loading branch information
benpicco authored Feb 6, 2024
2 parents 83f3c4a + d978a57 commit cc6eb46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/c25519/psa_c25519/edsign.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ psa_status_t psa_ecc_ed25519_verify_message(const uint8_t *key_buffer,

ret = edsign_verify(signature, key_buffer, input, input_length);
if (!ret) {
return PSA_ERROR_GENERIC_ERROR;
return PSA_ERROR_INVALID_SIGNATURE;
}

(void)key_buffer_size;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ psa_status_t CRYS_to_psa_error(CRYSError_t error)
case CRYS_ECMONT_PKI_ERROR:
case CRYS_ECMONT_IS_NOT_SUPPORTED:
case CRYS_ECEDW_IS_NOT_SUPPORTED:
return PSA_ERROR_INVALID_ARGUMENT;
return PSA_ERROR_INVALID_ARGUMENT;
default:
return PSA_ERROR_GENERIC_ERROR;
}
Expand Down

0 comments on commit cc6eb46

Please sign in to comment.