nts: convert to monotonic time

Use the monotonic timestamp provided by the scheduler for NTS-KE rate
limiting and refresh.
This commit is contained in:
Miroslav Lichvar
2020-03-11 09:22:53 +01:00
parent bb0553e4c4
commit fd59877692
2 changed files with 14 additions and 18 deletions

View File

@@ -85,7 +85,7 @@ get_request(NNC_Instance inst)
TEST_CHECK(!NNC_GenerateRequestAuth(inst, &packet, &info));
while (!NNC_PrepareForAuth(inst)) {
inst->last_nke_attempt.tv_sec = random();
inst->last_nke_attempt = random() % 100000 - 50000;
}
TEST_CHECK(inst->num_cookies > 0);