aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/m_md5_sha1.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2015-11-27 14:02:12 +0100
committerRichard Levitte <levitte@openssl.org>2015-12-07 17:39:23 +0100
commit6e59a892db781658c050e5217127c4147c116ac9 (patch)
treeeec9e79e1c71f9c2897f49b29084bf42a66e96db /crypto/evp/m_md5_sha1.c
parent9b6c00707eae2cbce79479f4b1a5dc11019abca0 (diff)
downloadopenssl-6e59a892db781658c050e5217127c4147c116ac9.tar.gz
Adjust all accesses to EVP_MD_CTX to use accessor functions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/evp/m_md5_sha1.c')
-rw-r--r--crypto/evp/m_md5_sha1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/m_md5_sha1.c b/crypto/evp/m_md5_sha1.c
index 22cd7ce733..dadb6c26b8 100644
--- a/crypto/evp/m_md5_sha1.c
+++ b/crypto/evp/m_md5_sha1.c
@@ -71,7 +71,7 @@ struct md5_sha1_ctx {
static int init(EVP_MD_CTX *ctx)
{
- struct md5_sha1_ctx *mctx = ctx->md_data;
+ struct md5_sha1_ctx *mctx = EVP_MD_CTX_md_data(ctx);
if (!MD5_Init(&mctx->md5))
return 0;
return SHA1_Init(&mctx->sha1);
@@ -79,7 +79,7 @@ static int init(EVP_MD_CTX *ctx)
static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
{
- struct md5_sha1_ctx *mctx = ctx->md_data;
+ struct md5_sha1_ctx *mctx = EVP_MD_CTX_md_data(ctx);
if (!MD5_Update(&mctx->md5, data, count))
return 0;
return SHA1_Update(&mctx->sha1, data, count);
@@ -87,7 +87,7 @@ static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
static int final(EVP_MD_CTX *ctx, unsigned char *md)
{
- struct md5_sha1_ctx *mctx = ctx->md_data;
+ struct md5_sha1_ctx *mctx = EVP_MD_CTX_md_data(ctx);
if (!MD5_Final(md, &mctx->md5))
return 0;
return SHA1_Final(md + MD5_DIGEST_LENGTH, &mctx->sha1);
@@ -98,7 +98,7 @@ static int ctrl(EVP_MD_CTX *ctx, int cmd, int mslen, void *ms)
unsigned char padtmp[48];
unsigned char md5tmp[MD5_DIGEST_LENGTH];
unsigned char sha1tmp[SHA_DIGEST_LENGTH];
- struct md5_sha1_ctx *mctx = ctx->md_data;
+ struct md5_sha1_ctx *mctx = EVP_MD_CTX_md_data(ctx);
if (cmd != EVP_CTRL_SSL3_MASTER_SECRET)
return 0;