aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-19 20:05:26 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-19 20:05:26 +0200
commit8f9a45e853d9759f04a5f4fe9aa0146ed3f3fb17 (patch)
treeb9ef6928b2fdb8647a8c7d3e0f6d316198b51d48 /src/revocation/gnunet-service-revocation.c
parenteb6b547e243144f27749811c15b6cce90e03aaa7 (diff)
downloadgnunet-8f9a45e853d9759f04a5f4fe9aa0146ed3f3fb17.tar.gz
gnunet-8f9a45e853d9759f04a5f4fe9aa0146ed3f3fb17.zip
towards less variance
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
-rw-r--r--src/revocation/gnunet-service-revocation.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index ff75faa2c..420cb392f 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -167,12 +167,8 @@ new_peer_entry (const struct GNUNET_PeerIdentity *peer)
167static int 167static int
168verify_revoke_message (const struct RevokeMessage *rm) 168verify_revoke_message (const struct RevokeMessage *rm)
169{ 169{
170 struct GNUNET_TIME_Absolute ts;
171 ts = GNUNET_TIME_absolute_ntoh (rm->ts);
172 if (GNUNET_YES != 170 if (GNUNET_YES !=
173 GNUNET_REVOCATION_check_pow (&rm->public_key, 171 GNUNET_REVOCATION_check_pow (&rm->proof_of_work,
174 &ts,
175 rm->proof_of_work,
176 (unsigned int) revocation_work_required)) 172 (unsigned int) revocation_work_required))
177 { 173 {
178 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -182,9 +178,9 @@ verify_revoke_message (const struct RevokeMessage *rm)
182 } 178 }
183 if (GNUNET_OK != 179 if (GNUNET_OK !=
184 GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION, 180 GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION,
185 &rm->purpose, 181 &rm->proof_of_work.purpose,
186 &rm->signature, 182 &rm->proof_of_work.signature,
187 &rm->public_key)) 183 &rm->proof_of_work.key))
188 { 184 {
189 GNUNET_break_op (0); 185 GNUNET_break_op (0);
190 return GNUNET_NO; 186 return GNUNET_NO;
@@ -311,7 +307,7 @@ publicize_rm (const struct RevokeMessage *rm)
311 struct GNUNET_HashCode hc; 307 struct GNUNET_HashCode hc;
312 struct GNUNET_SET_Element e; 308 struct GNUNET_SET_Element e;
313 309
314 GNUNET_CRYPTO_hash (&rm->public_key, 310 GNUNET_CRYPTO_hash (&rm->proof_of_work.key,
315 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), 311 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
316 &hc); 312 &hc);
317 if (GNUNET_YES == 313 if (GNUNET_YES ==
@@ -896,7 +892,7 @@ run (void *cls,
896 return; 892 return;
897 } 893 }
898 GNUNET_break (0 == ntohl (rm->reserved)); 894 GNUNET_break (0 == ntohl (rm->reserved));
899 GNUNET_CRYPTO_hash (&rm->public_key, 895 GNUNET_CRYPTO_hash (&rm->proof_of_work.key,
900 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey), 896 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey),
901 &hc); 897 &hc);
902 GNUNET_break (GNUNET_OK == 898 GNUNET_break (GNUNET_OK ==