[openssl] master update
shane.lontis at oracle.com
shane.lontis at oracle.com
Tue Jun 11 10:19:17 UTC 2019
The branch master has been updated
via 3d700c3fde15086fcb514ab7c90097f7f0f5d75f (commit)
from 7588660a534a9f154e1e25aa763964d507af8aab (commit)
- Log -----------------------------------------------------------------
commit 3d700c3fde15086fcb514ab7c90097f7f0f5d75f
Author: Shane Lontis <shane.lontis at oracle.com>
Date: Mon Jun 10 12:40:13 2019 +1000
Fix Keccak structure name reference in S390 legacy code
Reviewed-by: Tim Hudson <tjh at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9120)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/m_sha3.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/crypto/evp/m_sha3.c b/crypto/evp/m_sha3.c
index d80154c..f3266eb 100644
--- a/crypto/evp/m_sha3.c
+++ b/crypto/evp/m_sha3.c
@@ -118,7 +118,7 @@ static int s390x_sha3_init(EVP_MD_CTX *evp_ctx)
}
memset(ctx->A, 0, sizeof(ctx->A));
- ctx->num = 0;
+ ctx->bufsz = 0;
ctx->block_size = bsz;
ctx->md_size = evp_ctx->digest->md_size;
return 1;
@@ -145,7 +145,7 @@ static int s390x_shake_init(EVP_MD_CTX *evp_ctx)
}
memset(ctx->A, 0, sizeof(ctx->A));
- ctx->num = 0;
+ ctx->bufsz = 0;
ctx->block_size = bsz;
ctx->md_size = evp_ctx->digest->md_size;
return 1;
@@ -161,19 +161,19 @@ static int s390x_sha3_update(EVP_MD_CTX *evp_ctx, const void *_inp, size_t len)
if (len == 0)
return 1;
- if ((num = ctx->num) != 0) {
+ if ((num = ctx->bufsz) != 0) {
rem = bsz - num;
if (len < rem) {
memcpy(ctx->buf + num, inp, len);
- ctx->num += len;
+ ctx->bufsz += len;
return 1;
}
memcpy(ctx->buf + num, inp, rem);
inp += rem;
len -= rem;
s390x_kimd(ctx->buf, bsz, ctx->pad, ctx->A);
- ctx->num = 0;
+ ctx->bufsz = 0;
}
rem = len % bsz;
@@ -181,7 +181,7 @@ static int s390x_sha3_update(EVP_MD_CTX *evp_ctx, const void *_inp, size_t len)
if (rem) {
memcpy(ctx->buf, inp + len - rem, rem);
- ctx->num = rem;
+ ctx->bufsz = rem;
}
return 1;
}
@@ -190,7 +190,7 @@ static int s390x_sha3_final(EVP_MD_CTX *evp_ctx, unsigned char *md)
{
KECCAK1600_CTX *ctx = evp_ctx->md_data;
- s390x_klmd(ctx->buf, ctx->num, NULL, 0, ctx->pad, ctx->A);
+ s390x_klmd(ctx->buf, ctx->bufsz, NULL, 0, ctx->pad, ctx->A);
memcpy(md, ctx->A, ctx->md_size);
return 1;
}
@@ -199,7 +199,7 @@ static int s390x_shake_final(EVP_MD_CTX *evp_ctx, unsigned char *md)
{
KECCAK1600_CTX *ctx = evp_ctx->md_data;
- s390x_klmd(ctx->buf, ctx->num, md, ctx->md_size, ctx->pad, ctx->A);
+ s390x_klmd(ctx->buf, ctx->bufsz, md, ctx->md_size, ctx->pad, ctx->A);
return 1;
}
More information about the openssl-commits
mailing list