Welcome to little lamb

Code » ssp » commit d907653

Update to latest limb

author Olivier Brunel
2023-07-05 18:56:59 UTC
committer Olivier Brunel
2023-08-20 14:52:37 UTC
parent 5a1ca2982d7721639487428e960dd323e907a126

Update to latest limb

src/include/ssp.h +1 -1
src/ssp/get.c +3 -3

diff --git a/src/include/ssp.h b/src/include/ssp.h
index 51c5c24..75e9ec2 100644
--- a/src/include/ssp.h
+++ b/src/include/ssp.h
@@ -4,10 +4,10 @@
 #ifndef SSP_SSP_H
 #define SSP_SSP_H
 
-#include <skalibs/stralloc.h>
 #include <limb/cdb.h>
 #include <limb/cdbmake.h>
 #include <limb/int.h>
+#include <limb/stralloc.h>
 
 enum {
     OPT_HELP = 1 << 0,
diff --git a/src/ssp/get.c b/src/ssp/get.c
index 50c15f2..db1897c 100644
--- a/src/ssp/get.c
+++ b/src/ssp/get.c
@@ -3,7 +3,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 #include <errno.h>
 #include <time.h>
-#include <skalibs/stralloc.h>
 #include <limb/base32.h>
 #include <limb/command.h>
 #include <limb/exitcode.h>
@@ -19,6 +18,7 @@
 #include <limb/output.h>
 #include <limb/stralloc.h>
 #include <limb/u32.h>
+#include <limb/u64.h>
 #include "ssp.h"
 #include "hotp.h"
 
@@ -133,7 +133,7 @@ parse_cmdline(int argc, const char *argv[], const char usage[], struct get *ctx)
             dbg("setting secret to ", ctx->secret);
             break;
         case 'T':
-            if (!u640_scan(&ctx->ts, LO_ARG(&lo))) {
+            if (!u64_scan0(&ctx->ts, LO_ARG(&lo))) {
                 warn("invalid time stamp: ", LO_ARG(&lo));
                 diecmdusage(EX_USAGE, usage, &command_get);
             }
@@ -212,7 +212,7 @@ get_main(int argc, const char *argv[], const char *env[], const char usage[], vo
     int r = hotp(hr, ctx.secret, ctx.otp.slen, c, ctx.otp.digits);
     add((ctx.otp.type == TYPE_COUNTER) ? "H" : "T", "OTP: ");
     char buf[ctx.otp.digits + 1];
-    buf[u320_fmt(buf, r, sizeof(buf) - 1)] = 0;
+    buf[u32_0fmt(buf, r, sizeof(buf) - 1)] = 0;
     quiet(buf);
 
     /* TYPE_COUNTER implies to write the db with an updated/incremented