From bf1efdba13834414f1c222c902cd4e5f5f6cd499 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 3 May 2016 16:03:36 +0200 Subject: warn when second factor is preocessed but not enabled in config --- bin/ykfde.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/ykfde.c b/bin/ykfde.c index 2f1e73a..59b958d 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -206,6 +206,11 @@ int main(int argc, char **argv) { payload = strdup(""); } + /* warn when second factor is not enabled in config */ + if ((*(char*)payload != 0 || new_2nd_factor != NULL) && + iniparser_getboolean(ini, "general:" CONF2NDFACTOR, 0) == 0) + fprintf(stderr, "Warning: Processing second factor, but not enabled in config!\n"); + /* get random number and limit to printable ASCII character (32 to 126) */ for(i = 0; i < CHALLENGELEN; i++) challenge_new[i] = (rand() % (126 - 32)) + 32; -- cgit v1.2.3-70-g09d2