mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Return a failure if the sizes don't match
This commit is contained in:
@ -31699,10 +31699,14 @@ int StoreECC_DSA_Sig(byte* out, word32* outLen, mp_int* r, mp_int* s)
|
|||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/* Encode DSA signature into buffer. */
|
/* Encode DSA signature into buffer. */
|
||||||
ret = SetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, out);
|
ret = SetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, out);
|
||||||
if ((ret >= 0) && (ret == sz)) {
|
if (ret >= 0) {
|
||||||
/* Set the actual encoding size. */
|
if (ret == sz) {
|
||||||
*outLen = (word32)sz;
|
/* Set the actual encoding size. */
|
||||||
ret = 0;
|
*outLen = (word32)sz;
|
||||||
|
ret = 0;
|
||||||
|
} else {
|
||||||
|
ret = BAD_STATE_E;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user