aboutsummaryrefslogtreecommitdiff
path: root/gost_crypt.c
diff options
context:
space:
mode:
authorNikolay Morozov <nmorozoff77@yandex.ru>2019-12-26 09:17:06 +0300
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2020-02-01 22:27:33 +0300
commit28c0663468d3b8cd1805a9aa78f1471002ba34f0 (patch)
tree7d7010b82053afeaba77d891edbeb36eb016ba40 /gost_crypt.c
parent5dfb598defe4eedcdfb4f8a25604c466f9497b6d (diff)
downloadgost-engine-28c0663468d3b8cd1805a9aa78f1471002ba34f0.zip
gost-engine-28c0663468d3b8cd1805a9aa78f1471002ba34f0.tar.gz
gost-engine-28c0663468d3b8cd1805a9aa78f1471002ba34f0.tar.bz2
Remove unset local buffer meshing. This removes valgrind errors.
Diffstat (limited to 'gost_crypt.c')
-rw-r--r--gost_crypt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gost_crypt.c b/gost_crypt.c
index 16fb661..7e733df 100644
--- a/gost_crypt.c
+++ b/gost_crypt.c
@@ -1071,15 +1071,14 @@ static int gost_imit_init_cp_12(EVP_MD_CTX *ctx)
static void mac_block_mesh(struct ossl_gost_imit_ctx *c,
const unsigned char *data)
{
- unsigned char buffer[8];
/*
- * We are using local buffer for iv because CryptoPro doesn't interpret
+ * We are using NULL for iv because CryptoPro doesn't interpret
* internal state of MAC algorithm as iv during keymeshing (but does
* initialize internal state from iv in key transport
*/
assert(c->count % 8 == 0 && c->count <= 1024);
if (c->key_meshing && c->count == 1024) {
- cryptopro_key_meshing(&(c->cctx), buffer);
+ cryptopro_key_meshing(&(c->cctx), NULL);
}
mac_block(&(c->cctx), c->buffer, data);
c->count = c->count % 1024 + 8;