diff options
author | Franklin Wei <me@fwei.tk> | 2018-07-12 21:05:12 +0000 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-07-12 21:05:12 +0000 |
commit | 82e04dce129ee618f11c7c0afc2efd88a3e3dea5 (patch) | |
tree | ad3acddb6a73ec2bbf72507e1e7c278dc518ad34 /service_provider.c | |
parent | 00e5cc796efc779288f7418eb7f7211e2b1023a7 (diff) | |
download | csaa-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.c | 4 |
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); |