mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
Ensure that MDs created via EVP_MD_meth_new() go down the legacy route
MDs created via EVP_MD_meth_new() are inherently legacy and therefore need to go down the legacy route when they are used. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/17255)
This commit is contained in:
parent
64a8f6008a
commit
d9ad5b16b3
@ -208,7 +208,8 @@ static int evp_md_init_internal(EVP_MD_CTX *ctx, const EVP_MD *type,
|
||||
|| tmpimpl != NULL
|
||||
# endif
|
||||
#endif
|
||||
|| (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0) {
|
||||
|| (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0
|
||||
|| type->origin == EVP_ORIG_METH) {
|
||||
if (ctx->digest == ctx->fetched_digest)
|
||||
ctx->digest = NULL;
|
||||
EVP_MD_free(ctx->fetched_digest);
|
||||
|
Loading…
Reference in New Issue
Block a user