gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated: fix capitalization of SHA-256 / M


From: gnunet
Subject: [libmicrohttpd] branch master updated: fix capitalization of SHA-256 / MD5 as per RFC 7616 as reported on the mailinglist by Ahmet Kermen
Date: Mon, 17 Jan 2022 10:51:11 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 899e2620 fix capitalization of SHA-256 / MD5 as per RFC 7616 as 
reported on the mailinglist by Ahmet Kermen
899e2620 is described below

commit 899e26205a2dfca9885eb87c460c02124922f493
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jan 17 10:51:03 2022 +0100

    fix capitalization of SHA-256 / MD5 as per RFC 7616 as reported on the 
mailinglist by Ahmet Kermen
---
 src/microhttpd/digestauth.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index def2fb6d..7c22af6b 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -128,7 +128,7 @@ struct DigestAlgorithm
   void *ctx;
 
   /**
-   * Name of the algorithm, "md5" or "sha-256"
+   * Name of the algorithm, "MD5" or "SHA-256"
    */
   const char *alg;
 
@@ -198,8 +198,8 @@ cvthex (const unsigned char *bin,
  * calculate H(A1) from given hash as per RFC2617 spec
  * and store the * result in 'sessionkey'.
  *
- * @param alg The hash algorithm used, can be "md5" or "md5-sess"
- *            or "sha-256" or "sha-256-sess"
+ * @param alg The hash algorithm used, can be "MD5" or "MD5-sess"
+ *            or "SHA-256" or "SHA-256-sess"
  *    Note that the rest of the code does not support the the "-sess" variants!
  * @param[in,out] da digest implementation, must match @a alg; the
  *          da->sessionkey will be initialized to the digest in HEX
@@ -218,9 +218,9 @@ digest_calc_ha1_from_digest (const char *alg,
 {
   const unsigned int digest_size = da->digest_size;
   if ( (MHD_str_equal_caseless_ (alg,
-                                 "md5-sess")) ||
+                                 "MD5-sess")) ||
        (MHD_str_equal_caseless_ (alg,
-                                 "sha-256-sess")) )
+                                 "SHA-256-sess")) )
   {
     uint8_t dig[VLA_ARRAY_LEN_DIGEST (digest_size)];
 
@@ -260,8 +260,8 @@ digest_calc_ha1_from_digest (const char *alg,
  * calculate H(A1) from username, realm and password as per RFC2617 spec
  * and store the result in 'sessionkey'.
  *
- * @param alg The hash algorithm used, can be "md5" or "md5-sess"
- *             or "sha-256" or "sha-256-sess"
+ * @param alg The hash algorithm used, can be "MD5" or "MD5-sess"
+ *             or "SHA-256" or "SHA-256-sess"
  * @param username A `char *' pointer to the username value
  * @param realm A `char *' pointer to the realm value
  * @param password A `char *' pointer to the password value
@@ -1197,7 +1197,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
     case MHD_DIGEST_ALG_MD5:                        \
       da.digest_size = MD5_DIGEST_SIZE;             \
       da.ctx = &ctx.md5;                            \
-      da.alg = "md5";                               \
+      da.alg = "MD5";                               \
       da.sessionkey = skey.md5;                     \
       da.init = &MHD_MD5Init;                           \
       da.update = &MHD_MD5Update;                       \
@@ -1208,7 +1208,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
     case MHD_DIGEST_ALG_SHA256:                           \
       da.digest_size = SHA256_DIGEST_SIZE;                \
       da.ctx = &ctx.sha256;                               \
-      da.alg = "sha-256";                                 \
+      da.alg = "SHA-256";                                 \
       da.sessionkey = skey.sha256;                        \
       da.init = &MHD_SHA256_init;                             \
       da.update = &MHD_SHA256_update;                         \

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]