aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/sha256_ext.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-17 15:42:25 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-04-17 15:42:25 +0300
commite1b0fc4101c2a81a46246e7d27babbf9b4491ce6 (patch)
tree23fba521cf6eb8479d4241e9bba5a01a418999a4 /src/microhttpd/sha256_ext.c
parenteeb4166266659b3aa9134c70200478d1b9ab52ff (diff)
downloadlibmicrohttpd-e1b0fc4101c2a81a46246e7d27babbf9b4491ce6.tar.gz
libmicrohttpd-e1b0fc4101c2a81a46246e7d27babbf9b4491ce6.zip
{md5,sha256}_ext.c: comments added
Diffstat (limited to 'src/microhttpd/sha256_ext.c')
-rw-r--r--src/microhttpd/sha256_ext.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/microhttpd/sha256_ext.c b/src/microhttpd/sha256_ext.c
index d1c2a6ed..f8cae555 100644
--- a/src/microhttpd/sha256_ext.c
+++ b/src/microhttpd/sha256_ext.c
@@ -42,11 +42,14 @@ MHD_SHA256_init_one_time (struct Sha256CtxExt *ctx)
42 ctx->ext_error = gnutls_hash_init (&ctx->handle, GNUTLS_DIG_SHA256); 42 ctx->ext_error = gnutls_hash_init (&ctx->handle, GNUTLS_DIG_SHA256);
43 if ((0 != ctx->ext_error) && (NULL != ctx->handle)) 43 if ((0 != ctx->ext_error) && (NULL != ctx->handle))
44 { 44 {
45 /* GnuTLS may return initialisation error and set the handle at the
46 same time. Such handle cannot be used for calculations.
47 Note: GnuTLS may also return an error and NOT set the handle. */
45 gnutls_free (ctx->handle); 48 gnutls_free (ctx->handle);
46 ctx->handle = NULL; 49 ctx->handle = NULL;
47 } 50 }
48 else 51 else
49 mhd_assert (NULL != ctx->handle); 52 mhd_assert (NULL != ctx->handle); /* If error is not returned, the handle must not be NULL */
50} 53}
51 54
52 55