Merge pull request #3982 from dgarske/atca_bool

Fix for ATECC on platforms where bool and int have different sizes
This commit is contained in:
Chris Conlon
2021-04-30 13:59:49 -06:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -462,12 +462,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 */