math/Makefile.am, symm/Makefile.am: Use `--no-install' on oddball tests.
[catacomb] / progs / catsign.c
index 671cea6..3cce9c9 100644 (file)
@@ -715,7 +715,7 @@ static int verify(int argc, char *argv[])
                       (unsigned long)s.keyid);
     exit(EXIT_FAILURE);
   }
-  if (kk && k->id != kk->id) {
+  if (kk && k != kk) {
     if (v.verb) {
       dstr_reset(&d); key_fulltag(k, &d);
       dstr_reset(&dd); key_fulltag(kk, &dd);
@@ -749,14 +749,14 @@ static int verify(int argc, char *argv[])
   } else if (!of || strcmp(of, "-") == 0) {
     v.f |= F_BUFFER;
     ofp = stdout;
-  }
-  if (of && !(v.f & F_BUFFER)) {
+  } else if (of && !(v.f & F_BUFFER)) {
     if ((ofp = fopen(of, (v.f & F_BINARY) ? "wb" : "w")) == 0) {
       die(EXIT_FAILURE, "couldn't open file `%s' for output: %s",
          of, strerror(errno));
     }
     rfp = ofp;
-  } else if ((rfp = tmpfile()) == 0)
+  }
+  if ((v.f & F_BUFFER) && (rfp = tmpfile()) == 0)
     die(EXIT_FAILURE, "couldn't create temporary file: %s", strerror(errno));
 
   /* --- Read the message and verify the signature --- */