]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: hash-large: exercise gnutls_hash_output(..., NULL)
authorDaiki Ueno <ueno@gnu.org>
Mon, 22 Jul 2024 01:30:11 +0000 (10:30 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 22 Jul 2024 01:34:29 +0000 (10:34 +0900)
This adds a call to gnutls_hash_output with DIGEST argument as NULL to
exercise the context reset behavior added in commit
eced4c0c2b3d3ee6a35dab99616a25910b623f79.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
tests/slow/hash-large.c

index 385cbf55c93ad536d1bcc00fc57f5e22bb9de2d0..6e99be86f19da81581485b39c3d25581a24ac7a3 100644 (file)
@@ -116,6 +116,10 @@ void doit(void)
                fail("failed in %d\n", __LINE__);
        }
 
+       /* Test gnutls_hash_output(..., NULL) resets the context */
+       gnutls_hash(td, "foo", 3);
+       gnutls_hash_output(td, NULL);
+
        size2 = size;
        p = buf;
        while (size2 > 0) {