General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / key-flags.c
index d80da4f..605eb06 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: key-flags.c,v 1.4 2004/04/02 01:03:49 mdw Exp $
+ * $Id: key-flags.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
  *
  * Reading and writing key flag strings
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: key-flags.c,v $
- * Revision 1.4  2004/04/02 01:03:49  mdw
- * Miscellaneous constification.
- *
- * Revision 1.3  2004/03/28 01:58:47  mdw
- * Generate, store and retreive elliptic curve keys.
- *
- * Revision 1.2  2000/02/12 18:21:02  mdw
- * Overhaul of key management (again).
- *
- * Revision 1.1  1999/12/22 15:47:48  mdw
- * Major key-management revision.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <stdlib.h>
@@ -123,6 +106,8 @@ int key_readflags(const char *p, char **pp, unsigned *ff, unsigned *mm)
 
     /* --- Look up the string in the flags table --- */
 
+    if (sz == 4 && strncmp(p, "none", 4) == 0)
+      goto next;
     for (e = flagtab; e->name; e++) {
       if (strncmp(e->name, p, sz) == 0) {
        if (e->name[sz] == 0) {
@@ -146,6 +131,7 @@ int key_readflags(const char *p, char **pp, unsigned *ff, unsigned *mm)
       return (KERR_BADFLAGS);
     m |= ee->m;
     f |= ee->f;
+  next:
     p += sz;
     if (*p == 0 || *p == ':')
       break;