Fix for ATECC on platforms where bool and int have different sizes. Related to issue #3971

This commit is contained in:
David Garske
2021-04-23 11:15:36 -07:00
parent 67277d13cd
commit fa353b1ee0
2 changed files with 6 additions and 3 deletions

View File

@ -453,12 +453,15 @@ int atmel_ecc_sign(int slotId, const byte* message, byte* signature)
}
int atmel_ecc_verify(const byte* message, const byte* signature,
const byte* pubkey, int* verified)
const byte* pubkey, int* pVerified)
{
int ret;
bool verified = false;
ret = atcab_verify_extern(message, signature, pubkey, (bool*)verified);
ret = atcab_verify_extern(message, signature, pubkey, &verified);
ret = atmel_ecc_translate_err(ret);
if (pVerified)
*pVerified = (int)verified;
return ret;
}

View File

@ -119,7 +119,7 @@ int atmel_ecc_create_pms(int slotId, const uint8_t* peerKey, uint8_t* pms);
int atmel_ecc_create_key(int slotId, byte* peerKey);
int atmel_ecc_sign(int slotId, const byte* message, byte* signature);
int atmel_ecc_verify(const byte* message, const byte* signature,
const byte* pubkey, int* verified);
const byte* pubkey, int* pVerified);
#endif /* WOLFSSL_ATECC508A */