The transient "seedbuf" value should not persist in keys that that are
loaded from the "expanded" form when "prefer_seed = no".
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
MergeDate: Thu Jun 18 08:02:39 2026
(Merged from https://github.com/openssl/openssl/pull/31252)
|| (mdctx = EVP_MD_CTX_new()) == NULL)
return 0;
+ /* Clear any unused seed */
+ ossl_ml_kem_key_reset(key);
+
if (add_storage(OPENSSL_malloc(vinfo->puballoc),
OPENSSL_secure_malloc(vinfo->prvalloc), 1, 0, key))
ret = parse_prvkey(in, mdctx, key);