fix F-705: Missing wc_RsaSetRNG in sig_alg km_pkcs1_set_pub After Key Re-Init

This commit is contained in:
Daniel Pouzzner
2026-06-11 16:48:19 -05:00
parent 9c1d9c164b
commit f48efe5bfc
+6
View File
@@ -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);