mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Fixed wolfIoT_ecc_keygen when key is stored during generation
This commit is contained in:
@@ -909,6 +909,9 @@ static int wolfIoT_ecc_keygen(WOLFSSL* ssl, struct ecc_key* key,
|
|||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = iotsafe_get_public_key((byte *)&iotsafe->ecdh_keypair_slot,
|
ret = iotsafe_get_public_key((byte *)&iotsafe->ecdh_keypair_slot,
|
||||||
IOTSAFE_ID_SIZE, key);
|
IOTSAFE_ID_SIZE, key);
|
||||||
|
} else if (ret > 0) {
|
||||||
|
/* Key has been stored during generation */
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
WC_RNG *rng = wolfSSL_GetRNG(ssl);
|
WC_RNG *rng = wolfSSL_GetRNG(ssl);
|
||||||
|
Reference in New Issue
Block a user