/* -*-c-*-
*
- * $Id: key-binary.c,v 1.1 2000/02/12 18:21:02 mdw Exp $
+ * $Id: key-binary.c,v 1.3 2001/02/03 11:57:00 mdw Exp $
*
* Key binary encoding
*
/*----- Revision history --------------------------------------------------*
*
* $Log: key-binary.c,v $
+ * Revision 1.3 2001/02/03 11:57:00 mdw
+ * Track mLib change: symbols no longer need to include a terminating
+ * null.
+ *
+ * Revision 1.2 2000/06/17 11:25:20 mdw
+ * Use secure memory interface from MP library.
+ *
* Revision 1.1 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
/* --- Multiprecision integer data --- */
case KENC_MP:
- k->u.m = mp_loadb(MP_NEW, q + 4, psz);
- if (k->e & KF_BURN)
- mp_burn(k->u.m);
+ k->u.m = mp_loadb(k->e & KF_BURN ? MP_NEWSEC : MP_NEW, q + 4, psz);
break;
/* --- Structured key data --- */
/* --- Create a table node and fill it in --- */
- ks = sym_find(&k->u.s, d.buf, d.len + 1, sizeof(*ks), &f);
+ ks = sym_find(&k->u.s, d.buf, d.len, sizeof(*ks), &f);
if (f)
goto fail;
if (key_decode(q, sz, &ks->k)) {