aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszszszsz <szszszsz@users.noreply.github.com>2016-04-19 14:13:52 +0200
committerszszszsz <szszszsz@users.noreply.github.com>2016-04-19 14:13:52 +0200
commitc19dfe6834d9e02b45b9215a49be429f97970446 (patch)
tree8b0800ee681698fdee07ec66cb34e88c25d94433
parentee12d4364ca023f7dcffc39ed231b0ef26055013 (diff)
parentab2658a648acc90d63f453cfbaca2970525e7e71 (diff)
downloadlibnitrokey-c19dfe6834d9e02b45b9215a49be429f97970446.tar.gz
libnitrokey-c19dfe6834d9e02b45b9215a49be429f97970446.tar.bz2
Merge pull request #9 from privacyidea/fix_counter_reset
Reset the HOTP counter
-rw-r--r--unittest/test_HOTP.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittest/test_HOTP.cc b/unittest/test_HOTP.cc
index b263693..1f54376 100644
--- a/unittest/test_HOTP.cc
+++ b/unittest/test_HOTP.cc
@@ -59,6 +59,8 @@ TEST_CASE("Test HOTP codes according to RFC", "[HOTP]") {
//strcpy(reinterpret_cast<char *>(hwrite.slot_secret), "");
const char* secretHex = "3132333435363738393031323334353637383930";
hexStringToByte(hwrite.slot_secret, secretHex);
+ // reset the HOTP counter
+ memset(hwrite.slot_counter, 0, 8);
//hwrite.slot_config; //TODO check various configs in separate test cases
//strcpy(reinterpret_cast<char *>(hwrite.slot_token_id), "");
//strcpy(reinterpret_cast<char *>(hwrite.slot_counter), "");