mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fix to use inLen
for raw public key copy. No need to throw an error for other curve types as this function may be used for software only import/export. In the TLS case with only SECP256R1 there are other places where an error will be thrown.
This commit is contained in:
@ -6314,7 +6314,7 @@ int wc_ecc_import_x963_ex(const byte* in, word32 inLen, ecc_key* key,
|
|||||||
/* For SECP256R1 only save raw public key for hardware */
|
/* For SECP256R1 only save raw public key for hardware */
|
||||||
if (curve_id == ECC_SECP256R1 && !compressed &&
|
if (curve_id == ECC_SECP256R1 && !compressed &&
|
||||||
inLen <= sizeof(key->pubkey_raw)) {
|
inLen <= sizeof(key->pubkey_raw)) {
|
||||||
XMEMCPY(key->pubkey_raw, (byte*)in, sizeof(key->pubkey_raw));
|
XMEMCPY(key->pubkey_raw, (byte*)in, inLen);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user