mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 18:30:48 +02:00
fix F-705: Missing wc_RsaSetRNG in sig_alg km_pkcs1_set_pub After Key Re-Init
This commit is contained in:
@@ -1621,6 +1621,12 @@ static int km_pkcs1_set_pub(struct crypto_sig *tfm, const void *key,
|
||||
if (unlikely(err)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Note the initialization of ctx->rng is deferred unless/until needed. */
|
||||
err = wc_RsaSetRNG(ctx->key, &ctx->rng);
|
||||
if (unlikely(err)) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
err = wc_RsaPublicKeyDecode(key, &idx, ctx->key, keylen);
|
||||
|
||||
Reference in New Issue
Block a user