if (type->prov == NULL) {
#ifdef FIPS_MODE
- /* We only do explict fetches inside the FIPS module */
+ /* We only do explicit fetches inside the FIPS module */
EVPerr(EVP_F_EVP_DIGESTINIT_EX, EVP_R_INITIALIZATION_ERROR);
return 0;
#else
return 0;
}
- if (ctx->digest == NULL || ctx->digest->prov == NULL)
+ if (ctx->digest == NULL
+ || ctx->digest->prov == NULL
+ || (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0)
goto legacy;
if (ctx->digest->dupdate == NULL) {
return 0;
}
- if (in->digest->prov == NULL)
+ if (in->digest->prov == NULL
+ || (in->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0)
goto legacy;
if (in->digest->dupctx == NULL) {
size_t sz;
OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
- if (ctx == NULL || ctx->digest == NULL) {
- ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
+ if (ctx == NULL) {
+ ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
- if (ctx->digest->prov == NULL
- && (ctx->pctx == NULL
- || (ctx->pctx->operation != EVP_PKEY_OP_VERIFYCTX
- && ctx->pctx->operation != EVP_PKEY_OP_SIGNCTX)))
+ if (ctx->digest != NULL && ctx->digest->prov == NULL)
goto legacy;
switch (cmd) {