X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gosthash.c;h=036a2b3520f85319bc324b7e1ce792943affd314;hb=a430c355a1d2eff5df6c96c7b6f928a609c2dd73;hp=b3d80d4ac62edb2fbe91df823100d391dfb426d8;hpb=02f99b2e3b46f4ff44fd5420487551d5a447c2ad;p=openssl-gost%2Fengine.git diff --git a/gosthash.c b/gosthash.c index b3d80d4..036a2b3 100644 --- a/gosthash.c +++ b/gosthash.c @@ -255,6 +255,8 @@ int finish_hash(gost_hash_ctx * ctx, byte * hashval) fin_len += ctx->left; } memset(buf, 0, 32); + if (fin_len == 0) + hash_step(ctx->cipher_ctx, H, buf); bptr = buf; fin_len <<= 3; /* Hash length in BITS!! */ while (fin_len > 0) {