output error message in case of revoked key
authorDaniel Golle <daniel@makrotopia.org>
Thu, 7 Jun 2018 21:52:16 +0000 (23:52 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 14 Jun 2018 16:51:22 +0000 (18:51 +0200)
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This work was sponsored by WIO (wiowireless.com)

usign-exec.c

index 514de2a08968fa3f6f6670904e9e1b42e9005100..687cb7dcfeaaf98203a31e3f40846ba46842229e 100644 (file)
@@ -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";