/* -*-c-*-
*
- * $Id: key-data.c,v 1.2 2000/02/12 18:21:02 mdw Exp $
+ * $Id: key-data.c,v 1.3 2000/06/17 11:26:03 mdw Exp $
*
* Encoding and decoding of key data
*
/*----- Revision history --------------------------------------------------*
*
* $Log: key-data.c,v $
+ * Revision 1.3 2000/06/17 11:26:03 mdw
+ * key_structfind: track minor data structure change, and cope if the
+ * subkey isn't available.
+ *
* Revision 1.2 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
key_data *key_structfind(key_data *k, const char *tag)
{
key_struct *ks;
- assert(((void)"Key is not structured", k->e == KENC_STRUCT));
+ assert(((void)"Key is not structured",
+ (k->e & KF_ENCMASK) == KENC_STRUCT));
ks = sym_find(&k->u.s, tag, -1, 0, 0);
+ if (!ks)
+ return (0);
return (&ks->k);
}