From 44e76778e3bcaab899b66fa2ec0cda8658fc8753 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 7 Jun 2018 23:52:16 +0200 Subject: [PATCH] output error message in case of revoked key Signed-off-by: Daniel Golle This work was sponsored by WIO (wiowireless.com) --- usign-exec.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usign-exec.c b/usign-exec.c index 514de2a..687cb7d 100644 --- a/usign-exec.c +++ b/usign-exec.c @@ -177,12 +177,17 @@ int usign_v(const char *msgfile, const char *pubkeyfile, unsigned int usign_argc = 0; char fingerprint[17]; - if (usign_f_sig(fingerprint, sigfile)) + if (usign_f_sig(fingerprint, sigfile)) { + if (!quiet) + fprintf(stdout, "cannot get signing key fingerprint\n"); return 1; + } - if (pubkeydir && _usign_key_is_revoked(fingerprint, pubkeydir)) + if (pubkeydir && _usign_key_is_revoked(fingerprint, pubkeydir)) { + if (!quiet) + fprintf(stdout, "key %s has been revoked!\n", fingerprint); return 1; - + } usign_argv[usign_argc++] = "/usr/bin/usign"; usign_argv[usign_argc++] = "-V"; usign_argv[usign_argc++] = "-m"; -- 2.25.1