Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13402)
+ } else {
+ if (ctx->digest == NULL) {
+ ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
+ return 0;
+ }
+ type = ctx->digest;
+ }
/* TODO(3.0): Legacy work around code below. Remove this */
#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
/* TODO(3.0): Legacy work around code below. Remove this */
#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
ctx->engine = impl;
} else
ctx->engine = NULL;
ctx->engine = impl;
} else
ctx->engine = NULL;
- } else {
- if (!ctx->digest) {
- ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
- return 0;
- }
- type = ctx->digest;
}
#endif
if (ctx->digest != type) {
}
#endif
if (ctx->digest != type) {