math/Makefile.am, symm/Makefile.am: Use `--no-install' on oddball tests.
[catacomb] / progs / cc-kem.c
index cf53eaf..1e99e05 100644 (file)
@@ -860,16 +860,6 @@ k_found:;
        halg, t.buf);
   }
 
-  dstr_reset(&d);
-  if ((q = key_getattr(0, k, "kdf")) == 0) {
-    dstr_putf(&d, "%s-mgf", kk->hc->name);
-    q = d.buf;
-  }
-  if ((kk->cxc = gcipher_byname(q)) == 0) {
-    die(EXIT_FAILURE, "encryption scheme (KDF) `%s' not found in key `%s'",
-       q, t.buf);
-  }
-
   if (!balg)
     bt = bulktab;
   else {
@@ -887,6 +877,16 @@ k_found:;
   *bc = bo->init(k, balg, kk->hc->name);
   (*bc)->ops = bo;
 
+  dstr_reset(&d);
+  if ((q = key_getattr(0, k, "kdf")) == 0) {
+    dstr_putf(&d, "%s-mgf", kk->hc->name);
+    q = d.buf;
+  }
+  if ((kk->cxc = gcipher_byname(q)) == 0) {
+    die(EXIT_FAILURE, "encryption scheme (KDF) `%s' not found in key `%s'",
+       q, t.buf);
+  }
+
   /* --- Tidy up --- */
 
   dstr_destroy(&d);