aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/revocation_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r--src/revocation/revocation_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index e2f871c23..f2b95bafa 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -707,6 +707,7 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc)
707 unsigned int zeros; 707 unsigned int zeros;
708 int ret; 708 int ret;
709 uint64_t pow_nbo; 709 uint64_t pow_nbo;
710 ssize_t ksize;
710 711
711 pc->current_pow++; 712 pc->current_pow++;
712 pk = (const struct GNUNET_IDENTITY_PublicKey *) &(pc->pow[1]); 713 pk = (const struct GNUNET_IDENTITY_PublicKey *) &(pc->pow[1]);
@@ -722,9 +723,11 @@ GNUNET_REVOCATION_pow_round (struct GNUNET_REVOCATION_PowCalculationHandle *pc)
722 GNUNET_memcpy (&buf[sizeof(uint64_t)], 723 GNUNET_memcpy (&buf[sizeof(uint64_t)],
723 &pc->pow->timestamp, 724 &pc->pow->timestamp,
724 sizeof (uint64_t)); 725 sizeof (uint64_t));
726 ksize = GNUNET_IDENTITY_key_get_length (pk);
727 GNUNET_assert (0 < ksize);
725 GNUNET_memcpy (&buf[sizeof(uint64_t) * 2], 728 GNUNET_memcpy (&buf[sizeof(uint64_t) * 2],
726 pk, 729 pk,
727 GNUNET_IDENTITY_key_get_length (pk)); 730 ksize);
728 GNUNET_CRYPTO_pow_hash (&salt, 731 GNUNET_CRYPTO_pow_hash (&salt,
729 buf, 732 buf,
730 sizeof(buf), 733 sizeof(buf),