General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / cc-kem.c
index 4f71d0d..8ba29fd 100644 (file)
--- a/cc-kem.c
+++ b/cc-kem.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: cc-kem.c,v 1.1 2004/04/17 09:58:37 mdw Exp $
+ * $Id$
  *
  * Catcrypt key-encapsulation
  *
@@ -324,11 +324,7 @@ static const kemops ec_decops = {
 
 /* --- The switch table --- */
 
-static const struct kemtab {
-  const char *name;
-  const kemops *encops;
-  const kemops *decops;
-} kemtab[] = {
+const struct kemtab kemtab[] = {
   { "rsa",     &rsa_encops,    &rsa_decops },
   { "dh",      &dh_encops,     &dh_decops },
   { "ec",      &ec_encops,     &ec_decops },
@@ -483,7 +479,7 @@ int setupkem(kem *k, dstr *d, gcipher **cx, gcipher **c, gmac **m)
   octet *kd;
   size_t n, cn, mn;
   ghash *h;
-  int rc = 0;
+  int rc = -1;
 
   h = GH_INIT(k->h);
   if (k->ops->doit(k, d, h))