gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix bug in TOTP calculation


From: gnunet
Subject: [taler-anastasis] branch master updated: fix bug in TOTP calculation
Date: Wed, 10 May 2023 01:12:09 +0200

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 28abc69  fix bug in TOTP calculation
28abc69 is described below

commit 28abc69a5ca126032362891955096860501a6dc2
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed May 10 01:12:06 2023 +0200

    fix bug in TOTP calculation
---
 src/authorization/anastasis_authorization_plugin_totp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/authorization/anastasis_authorization_plugin_totp.c 
b/src/authorization/anastasis_authorization_plugin_totp.c
index e1c104a..c127e38 100644
--- a/src/authorization/anastasis_authorization_plugin_totp.c
+++ b/src/authorization/anastasis_authorization_plugin_totp.c
@@ -188,7 +188,7 @@ compute_totp (int time_off,
 
     offset = hmac[sizeof (hmac) - 1] & 0x0f;
     for (int count = 0; count < 4; count++)
-      code |= hmac[offset + 3 - count] << (8 * count);
+      code |= ((uint32_t) hmac[offset + 3 - count]) << (8 * count);
     code &= 0x7fffffff;
     /* always use 8 digits (maximum) */
     code = code % 100000000;

-- 
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]