projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use @va_arg@ as an argument to @STORE32@!
[u/mdw/catacomb]
/
key-binary.c
diff --git
a/key-binary.c
b/key-binary.c
index
4459ff1
..
79712e1
100644
(file)
--- a/
key-binary.c
+++ b/
key-binary.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Key binary encoding
*
@@
-30,6
+30,13
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: key-binary.c,v $
/*----- 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).
*
* Revision 1.1 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
@@
-97,9
+104,7
@@
int key_decode(const void *p, size_t sz, key_data *k)
/* --- Multiprecision integer data --- */
case KENC_MP:
/* --- 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 --- */
break;
/* --- Structured key data --- */
@@
-136,7
+141,7
@@
int key_decode(const void *p, size_t sz, key_data *k)
/* --- Create a table node and fill it in --- */
/* --- 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)) {
if (f)
goto fail;
if (key_decode(q, sz, &ks->k)) {