From 380a6fdc5b794ad57e32e480022ab3af6f8de37d Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 17 Jun 2000 11:26:03 +0000 Subject: [PATCH] key_structfind: track minor data structure change, and cope if the subkey isn't available. --- key-data.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/key-data.c b/key-data.c index 5da8b38..294fe34 100644 --- a/key-data.c +++ b/key-data.c @@ -1,6 +1,6 @@ /* -*-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 * @@ -30,6 +30,10 @@ /*----- 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). * @@ -138,8 +142,11 @@ void key_structure(key_data *k) 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); } -- 2.11.0