Fixes #17261
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17263)
if (out->fetched_digest != NULL)
EVP_MD_free(out->fetched_digest);
*out = *in;
- return 1;
+ goto clone_pkey;
}
if (in->digest->prov == NULL
}
}
+ clone_pkey:
/* copied EVP_MD_CTX should free the copied EVP_PKEY_CTX */
EVP_MD_CTX_clear_flags(out, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX);
#ifndef FIPS_MODULE