Skip to content

Commit 5ef6ed5

Browse files
authored
Merge pull request #7135 from lealem47/returnParity
Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex
2 parents 0b167fa + cbc8e98 commit 5ef6ed5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32149,6 +32149,11 @@ int DecodeECC_DSA_Sig_Ex(const byte* sig, word32 sigLen, mp_int* r, mp_int* s,
3214932149
/* Decode the DSA signature. */
3215032150
ret = GetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, 0, sig, &idx,
3215132151
sigLen);
32152+
32153+
if (ret != 0) {
32154+
ret = ASN_ECC_KEY_E;
32155+
}
32156+
3215232157
#ifndef NO_STRICT_ECDSA_LEN
3215332158
/* sanity check that the index has been advanced all the way to the end of
3215432159
* the buffer */

0 commit comments

Comments
 (0)