Merge pull request #1410 from dgarske/fix_pluton_ecc_sign

Fix for pluton ECC sign
This commit is contained in:
JacobBarthelmeh 2018-03-02 11:07:01 -07:00 committed by GitHub
commit edfe16ef8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3587,8 +3587,9 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
}
#elif defined(PLUTON_CRYPTO_ECC)
/* perform ECC sign */
err = Crypto_EccSign(in, inlen, out, &outlen);
if (err != CRYPTO_RES_SUCCESS) {
err = Crypto_EccSign(in, inlen, out, outlen);
if (err != CRYPTO_RES_SUCCESS ||
*outlen != ECC_MAX_CRYPTO_HW_SIZE*2) {
return BAD_COND_E;
}
#endif