]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gosthash.c
Initial commit providing GOST 2012 algorithms.
[openssl-gost/engine.git] / gosthash.c
index 72faa24ed5605fafc8db7316396f957e875a8fb1..ee4a57debbfef24a45e4339b9e79c0b1862bf008 100644 (file)
@@ -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) {