aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2002-03-09 18:58:05 +0000
committerDr. Stephen Henson <steve@openssl.org>2002-03-09 18:58:05 +0000
commitbf6a9e66d6b339770dcc8733f97fd6eb10d58d6c (patch)
tree567122ac858d12dba01d3c45085a883a29c5b465 /crypto/evp/digest.c
parent0c372b94f77bebed947b6a5d217a141a3259b3ed (diff)
downloadopenssl-bf6a9e66d6b339770dcc8733f97fd6eb10d58d6c.tar.gz
Make ciphers and digests obtain an ENGINE functional reference
if impl is explicitly supplied.
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 12c6cec5d8..a969ac69ed 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -152,7 +152,15 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
* ENGINE and EVP_MD could be used). */
if(ctx->engine)
ENGINE_finish(ctx->engine);
- if(!impl)
+ if(impl)
+ {
+ if (!ENGINE_init(impl))
+ {
+ EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_INITIALIZATION_ERROR);
+ return 0;
+ }
+ }
+ else
/* Ask if an ENGINE is reserved for this job */
impl = ENGINE_get_digest_engine(type->type);
if(impl)