forked from wolfSSL/wolfssl
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:
@@ -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,
|
int atmel_ecc_verify(const byte* message, const byte* signature,
|
||||||
const byte* pubkey, int* verified)
|
const byte* pubkey, int* pVerified)
|
||||||
{
|
{
|
||||||
int ret;
|
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);
|
ret = atmel_ecc_translate_err(ret);
|
||||||
|
if (pVerified)
|
||||||
|
*pVerified = (int)verified;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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_create_key(int slotId, byte* peerKey);
|
||||||
int atmel_ecc_sign(int slotId, const byte* message, byte* signature);
|
int atmel_ecc_sign(int slotId, const byte* message, byte* signature);
|
||||||
int atmel_ecc_verify(const byte* message, const 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 */
|
#endif /* WOLFSSL_ATECC508A */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user