From 3a860a5d5231e4912d4611397752f2010467a578 Mon Sep 17 00:00:00 2001
From: Ondrej Mosnacek <omosnace@redhat.com>
Date: Mon, 16 Apr 2018 19:35:57 +0200
Subject: [PATCH] kcapi-hasher: Fix FIPS self-check always failing
---
apps/kcapi-hasher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/kcapi-hasher.c b/apps/kcapi-hasher.c
index 861db79..a5e9c71 100644
--- a/apps/kcapi-hasher.c
+++ b/apps/kcapi-hasher.c
@@ -583,6 +583,7 @@ static int process_checkfile(const struct hash_params *params,
if (ret >= 0)
ret++;
}
+ checked_any = 1;
} else {
/*
* fipscheck does not have the filename in the check
@@ -591,11 +592,10 @@ static int process_checkfile(const struct hash_params *params,
if (targetfile) {
ret = hasher(handle, params, targetfile,
hexhash, hexhashlen + 1, stdout);
+ checked_any = 1;
goto out;
}
}
-
- checked_any = 1;
}
out: