From: Daniel Golle Date: Thu, 7 Jun 2018 21:52:16 +0000 (+0200) Subject: output error message in case of revoked key X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=44e76778e3bcaab899b66fa2ec0cda8658fc8753;p=oweals%2Fucert.git output error message in case of revoked key Signed-off-by: Daniel Golle This work was sponsored by WIO (wiowireless.com) --- 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";