forked from wolfSSL/wolfssl
stm32_pka: using XMEMCPY
This commit is contained in:
@ -787,7 +787,7 @@ int stm32_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
|||||||
pka_ecc.RSign = Rbin;
|
pka_ecc.RSign = Rbin;
|
||||||
pka_ecc.SSign = Sbin;
|
pka_ecc.SSign = Sbin;
|
||||||
XMEMSET(Hashbin, 0, STM32_MAX_ECC_SIZE);
|
XMEMSET(Hashbin, 0, STM32_MAX_ECC_SIZE);
|
||||||
memcpy(Hashbin + (size - hashlen), hash, hashlen);
|
XMEMCPY(Hashbin + (size - hashlen), hash, hashlen);
|
||||||
pka_ecc.hash = Hashbin;
|
pka_ecc.hash = Hashbin;
|
||||||
|
|
||||||
status = HAL_PKA_ECDSAVerif(&hpka, &pka_ecc, 0xFFFFFFFF);
|
status = HAL_PKA_ECDSAVerif(&hpka, &pka_ecc, 0xFFFFFFFF);
|
||||||
@ -856,7 +856,7 @@ int stm32_ecc_sign_hash_ex(const byte* hash, word32 hashlen, WC_RNG* rng,
|
|||||||
pka_ecc.primeOrder = order;
|
pka_ecc.primeOrder = order;
|
||||||
|
|
||||||
XMEMSET(Hashbin, 0, STM32_MAX_ECC_SIZE);
|
XMEMSET(Hashbin, 0, STM32_MAX_ECC_SIZE);
|
||||||
memcpy(Hashbin + (size - hashlen), hash, hashlen);
|
XMEMCPY(Hashbin + (size - hashlen), hash, hashlen);
|
||||||
pka_ecc.hash = Hashbin;
|
pka_ecc.hash = Hashbin;
|
||||||
pka_ecc.integer = Intbin;
|
pka_ecc.integer = Intbin;
|
||||||
pka_ecc.privateKey = Keybin;
|
pka_ecc.privateKey = Keybin;
|
||||||
|
Reference in New Issue
Block a user