aboutsummaryrefslogtreecommitdiff
path: root/src/revocation
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-16 09:48:03 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-16 09:48:03 +0200
commit4bf09d00f1aeb0586f14587dfa455a0a5b902eda (patch)
tree7d40dd74b1303e66f52668d6cc659bd2657232fd /src/revocation
parentffd4382a73e2fa1d99812df14ed1025fadeb4017 (diff)
downloadgnunet-4bf09d00f1aeb0586f14587dfa455a0a5b902eda.tar.gz
gnunet-4bf09d00f1aeb0586f14587dfa455a0a5b902eda.zip
- fix tvgs; expose alternative identity type
Diffstat (limited to 'src/revocation')
-rw-r--r--src/revocation/gnunet-revocation-tvg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c
index 13dee3529..1692472bb 100644
--- a/src/revocation/gnunet-revocation-tvg.c
+++ b/src/revocation/gnunet-revocation-tvg.c
@@ -67,7 +67,7 @@ run (void *cls,
67{ 67{
68 struct GNUNET_IDENTITY_PrivateKey id_priv; 68 struct GNUNET_IDENTITY_PrivateKey id_priv;
69 struct GNUNET_IDENTITY_PublicKey id_pub; 69 struct GNUNET_IDENTITY_PublicKey id_pub;
70 struct GNUNET_REVOCATION_PowP pow; 70 struct GNUNET_REVOCATION_PowP *pow;
71 struct GNUNET_REVOCATION_PowCalculationHandle *ph; 71 struct GNUNET_REVOCATION_PowCalculationHandle *ph;
72 struct GNUNET_TIME_Relative exp; 72 struct GNUNET_TIME_Relative exp;
73 73
@@ -81,10 +81,10 @@ run (void *cls,
81 fprintf (stdout, "Zone public key (zk):\n"); 81 fprintf (stdout, "Zone public key (zk):\n");
82 print_bytes (&id_pub, sizeof(id_pub), 0); 82 print_bytes (&id_pub, sizeof(id_pub), 0);
83 fprintf (stdout, "\n"); 83 fprintf (stdout, "\n");
84 memset (&pow, 0, sizeof (pow)); 84 pow = GNUNET_malloc (GNUNET_REVOCATION_MAX_PROOF_SIZE);
85 GNUNET_REVOCATION_pow_init (&id_priv, 85 GNUNET_REVOCATION_pow_init (&id_priv,
86 &pow); 86 pow);
87 ph = GNUNET_REVOCATION_pow_start (&pow, 87 ph = GNUNET_REVOCATION_pow_start (pow,
88 TEST_EPOCHS, 88 TEST_EPOCHS,
89 TEST_DIFFICULTY); 89 TEST_DIFFICULTY);
90 fprintf (stdout, "Difficulty (%d base difficulty + %d epochs): %d\n\n", 90 fprintf (stdout, "Difficulty (%d base difficulty + %d epochs): %d\n\n",
@@ -98,12 +98,12 @@ run (void *cls,
98 } 98 }
99 exp = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 99 exp = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS,
100 TEST_EPOCHS); 100 TEST_EPOCHS);
101 GNUNET_assert (GNUNET_OK == GNUNET_REVOCATION_check_pow (&pow, 101 GNUNET_assert (GNUNET_OK == GNUNET_REVOCATION_check_pow (pow,
102 TEST_DIFFICULTY, 102 TEST_DIFFICULTY,
103 exp)); 103 exp));
104 fprintf (stdout, "Proof:\n"); 104 fprintf (stdout, "Proof:\n");
105 print_bytes (&pow, 105 print_bytes (pow,
106 sizeof (pow), 106 GNUNET_REVOCATION_proof_get_size (pow),
107 8); 107 8);
108} 108}
109 109