diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-12-31 14:31:48 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-12-31 14:31:48 -0900 |
| commit | 03c8bfd0ab902dd28266c9acc1ab22b8c3d8264d (patch) | |
| tree | cab79ade711d1b2db94d087afbc942fd042aa7cb /tests | |
| parent | 249186761f117221f96133cd1488ca3ab2542c1c (diff) | |
| download | otputils-03c8bfd0ab902dd28266c9acc1ab22b8c3d8264d.tar.gz otputils-03c8bfd0ab902dd28266c9acc1ab22b8c3d8264d.tar.bz2 otputils-03c8bfd0ab902dd28266c9acc1ab22b8c3d8264d.tar.xz otputils-03c8bfd0ab902dd28266c9acc1ab22b8c3d8264d.zip | |
libotputil: adding arguments to otputil_hotp_code() and otputil_hotp_str()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-hotp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test-hotp.c b/tests/test-hotp.c index b9f9519..6522cbb 100644 --- a/tests/test-hotp.c +++ b/tests/test-hotp.c | |||
| @@ -372,15 +372,13 @@ main( | |||
| 372 | printf("%*s : %2" PRIu64 " : %6i : %*s\n", k_len, p->hotp_kb32, p->hotp_c, p->hotp_digits, code_len, code_str); | 372 | printf("%*s : %2" PRIu64 " : %6i : %*s\n", k_len, p->hotp_kb32, p->hotp_c, p->hotp_digits, code_len, code_str); |
| 373 | }; | 373 | }; |
| 374 | 374 | ||
| 375 | otputil_set_param(NULL, OTPUTIL_OPT_HOTP_DIGITS, &p->hotp_digits); | ||
| 376 | |||
| 377 | if ((hotp_k = otputil_base32bv(p->hotp_kb32)) == NULL) | 375 | if ((hotp_k = otputil_base32bv(p->hotp_kb32)) == NULL) |
| 378 | { | 376 | { |
| 379 | fprintf(stderr, "%s: otputil_base32bv(): internal error\n", PROGRAM_NAME); | 377 | fprintf(stderr, "%s: otputil_base32bv(): internal error\n", PROGRAM_NAME); |
| 380 | return(1); | 378 | return(1); |
| 381 | }; | 379 | }; |
| 382 | 380 | ||
| 383 | if ((hotp_code = otputil_hotp_code(hotp_k, p->hotp_c)) == -1) | 381 | if ((hotp_code = otputil_hotp_code(hotp_k, p->hotp_c, p->hotp_digits)) == -1) |
| 384 | { | 382 | { |
| 385 | fprintf(stderr, "%s: otputil_hotp_code(): internal error\n", PROGRAM_NAME); | 383 | fprintf(stderr, "%s: otputil_hotp_code(): internal error\n", PROGRAM_NAME); |
| 386 | otputil_bvfree(hotp_k); | 384 | otputil_bvfree(hotp_k); |
