Remove some legacy fields from the EVP_MD_CTX structure

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29460)
This commit is contained in:
Matt Caswell
2025-12-19 13:42:23 +00:00
committed by Neil Horman
parent 84b5f265ce
commit b2168cd81d
8 changed files with 39 additions and 49 deletions

View File

@@ -498,7 +498,6 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
out->pctx = NULL;
out->flags = in->flags;
out->update = in->update;
} else {
evp_md_ctx_reset_ex(out, 1);
digest_change = (out->fetched_digest != in->fetched_digest);

View File

@@ -909,23 +909,12 @@ void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx)
}
#endif /* !defined(FIPS_MODULE) */
#ifndef OPENSSL_NO_DEPRECATED_4_0
void *EVP_MD_CTX_get0_md_data(const EVP_MD_CTX *ctx)
{
return ctx->md_data;
}
int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
const void *data, size_t count)
{
return ctx->update;
}
void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
int (*update)(EVP_MD_CTX *ctx,
const void *data, size_t count))
{
ctx->update = update;
return NULL;
}
#endif
void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags)
{

View File

@@ -16,11 +16,9 @@ struct evp_md_ctx_st {
const EVP_MD *reqdigest; /* The original requested digest */
const EVP_MD *digest;
unsigned long flags;
void *md_data;
/* Public key context for sign/verify */
EVP_PKEY_CTX *pctx;
/* Update function: usually copied from EVP_MD */
int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count);
/*
* Opaque ctx returned from a providers digest algorithm implementation