aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-revocation.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-04-20 16:56:16 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-04-20 16:56:16 +0200
commitee5cfec8640886ea3fa3f582cb04347762feebbd (patch)
treec884ba6d0b6304fb635e4fd1a482fdffc91cf6f3 /src/revocation/gnunet-revocation.c
parent6d61330e3ae457a27f10247cd9caf53987604143 (diff)
downloadgnunet-ee5cfec8640886ea3fa3f582cb04347762feebbd.tar.gz
gnunet-ee5cfec8640886ea3fa3f582cb04347762feebbd.zip
fix tests
Diffstat (limited to 'src/revocation/gnunet-revocation.c')
-rw-r--r--src/revocation/gnunet-revocation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c
index c33f12c90..5f3df0ee0 100644
--- a/src/revocation/gnunet-revocation.c
+++ b/src/revocation/gnunet-revocation.c
@@ -345,6 +345,7 @@ ego_callback (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
345{ 345{
346 struct GNUNET_REVOCATION_Pow *pow; 346 struct GNUNET_REVOCATION_Pow *pow;
347 struct GNUNET_CRYPTO_EcdsaPublicKey key; 347 struct GNUNET_CRYPTO_EcdsaPublicKey key;
348 const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
348 struct GNUNET_REVOCATION_PowCalculationHandle *ph = NULL; 349 struct GNUNET_REVOCATION_PowCalculationHandle *ph = NULL;
349 int epochs; 350 int epochs;
350 351
@@ -356,6 +357,7 @@ ego_callback (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
356 return; 357 return;
357 } 358 }
358 GNUNET_IDENTITY_ego_get_public_key (ego, &key); 359 GNUNET_IDENTITY_ego_get_public_key (ego, &key);
360 privkey = GNUNET_IDENTITY_ego_get_private_key (ego);
359 pow = GNUNET_new (struct GNUNET_REVOCATION_Pow); 361 pow = GNUNET_new (struct GNUNET_REVOCATION_Pow);
360 if ((NULL != filename) && (GNUNET_YES == GNUNET_DISK_file_test (filename)) && 362 if ((NULL != filename) && (GNUNET_YES == GNUNET_DISK_file_test (filename)) &&
361 (sizeof(struct GNUNET_REVOCATION_Pow) == 363 (sizeof(struct GNUNET_REVOCATION_Pow) ==
@@ -406,7 +408,7 @@ ego_callback (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
406 "%s", 408 "%s",
407 _ ("Revocation certificate not ready, calculating proof of work\n")); 409 _ ("Revocation certificate not ready, calculating proof of work\n"));
408 if (NULL == ph) 410 if (NULL == ph)
409 ph = GNUNET_REVOCATION_pow_init (&key, 411 ph = GNUNET_REVOCATION_pow_init (privkey,
410 1, /* Epochs */ 412 1, /* Epochs */
411 matching_bits); 413 matching_bits);
412 pow_task = GNUNET_SCHEDULER_add_now (&calculate_pow, ph); 414 pow_task = GNUNET_SCHEDULER_add_now (&calculate_pow, ph);