aboutsummaryrefslogtreecommitdiff
path: root/service_provider.c
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-12 21:05:12 +0000
committerFranklin Wei <me@fwei.tk>2018-07-12 21:05:12 +0000
commit82e04dce129ee618f11c7c0afc2efd88a3e3dea5 (patch)
treead3acddb6a73ec2bbf72507e1e7c278dc518ad34 /service_provider.c
parent00e5cc796efc779288f7418eb7f7211e2b1023a7 (diff)
downloadcsaa-82e04dce129ee618f11c7c0afc2efd88a3e3dea5.zip
csaa-82e04dce129ee618f11c7c0afc2efd88a3e3dea5.tar.gz
csaa-82e04dce129ee618f11c7c0afc2efd88a3e3dea5.tar.bz2
csaa-82e04dce129ee618f11c7c0afc2efd88a3e3dea5.tar.xz
Make caller allocate memory in call to merkle_update()
Hopefully this is slightly faster... should probably profile.
Diffstat (limited to 'service_provider.c')
-rw-r--r--service_provider.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/service_provider.c b/service_provider.c
index cd3174e..63ba783 100644
--- a/service_provider.c
+++ b/service_provider.c
@@ -110,8 +110,8 @@ struct tm_cert cert_eq(struct service_provider *sp,
&nu1_hmac);
/* We now update the ancestors of the encloser node. */
- hash_t *old_depvalues;
- merkle_update(sp->iomt, encloser_leafidx, h_encmod, &old_depvalues);
+ hash_t *old_depvalues = malloc(sizeof(hash_t) * sp->iomt->mt_logleaves);
+ merkle_update(sp->iomt, encloser_leafidx, h_encmod, old_depvalues);
int *ins_orders;
hash_t *ins_comp = merkle_complement(sp->iomt, placeholder_leafidx, &ins_orders);