summaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2002-01-25 03:13:50 +0000
committerGeoff Thorpe <geoff@openssl.org>2002-01-25 03:13:50 +0000
commitf1c2a9de458b175dd6831cb742b34a7ef8d87aa8 (patch)
tree6b4cc9b1a6994d90208b0683efcd7944509da2e3 /crypto/evp/digest.c
parent52b66a622dfe0aae5fd6305c701b0f87e6d3f9d1 (diff)
The 'type' parameter, an EVP_MD pointer, represents the type of digest
required as well as a default implementation (when no ENGINE provides a replacement implementation). This change makes sure the correct implementation's "init()" handler is used rather than assuming 'type'.
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 798cf9d0aa..12c6cec5d8 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -189,7 +189,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
ctx->md_data=OPENSSL_malloc(type->ctx_size);
}
skip_to_init:
- return type->init(ctx);
+ return ctx->digest->init(ctx);
}
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data,