aboutsummaryrefslogtreecommitdiff
path: root/src/revocation
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-18 21:14:03 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-04-18 21:14:03 +0200
commiteb6b547e243144f27749811c15b6cce90e03aaa7 (patch)
tree790707a8828300d272f81b067fa28786738848a5 /src/revocation
parentf00c18e631ce8bdaf80d20f236ef275c9cb99291 (diff)
downloadgnunet-eb6b547e243144f27749811c15b6cce90e03aaa7.tar.gz
gnunet-eb6b547e243144f27749811c15b6cce90e03aaa7.zip
towards more expirations
Diffstat (limited to 'src/revocation')
-rw-r--r--src/revocation/revocation.h8
-rw-r--r--src/revocation/revocation_api.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/revocation/revocation.h b/src/revocation/revocation.h
index 184f58e0a..d7b9cc139 100644
--- a/src/revocation/revocation.h
+++ b/src/revocation/revocation.h
@@ -89,14 +89,14 @@ struct RevokeMessage
89 uint32_t reserved GNUNET_PACKED; 89 uint32_t reserved GNUNET_PACKED;
90 90
91 /** 91 /**
92 * Timestamp 92 * Number that causes a hash collision with the @e public_key.
93 */ 93 */
94 struct GNUNET_TIME_AbsoluteNBO ts; 94 uint64_t proof_of_work GNUNET_PACKED;
95 95
96 /** 96 /**
97 * Number that causes a hash collision with the @e public_key. 97 * Timestamp
98 */ 98 */
99 uint64_t proof_of_work GNUNET_PACKED; 99 struct GNUNET_TIME_AbsoluteNBO ts;
100 100
101 /** 101 /**
102 * Signature confirming revocation. 102 * Signature confirming revocation.
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index c2aafd254..c9bb2543a 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -368,13 +368,13 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
368 368
369 ts_nbo = GNUNET_TIME_absolute_hton (*ts); 369 ts_nbo = GNUNET_TIME_absolute_hton (*ts);
370 370
371 GNUNET_memcpy (buf, &pow, sizeof(pow)) ; 371 GNUNET_memcpy (buf, &pow, sizeof(pow));
372 GNUNET_memcpy (&buf[sizeof(pow)], key, 372 GNUNET_memcpy (&buf[sizeof(pow)],
373 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey));
374 GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)],
375 &ts_nbo, 373 &ts_nbo,
376 sizeof (struct GNUNET_TIME_AbsoluteNBO)); 374 sizeof (struct GNUNET_TIME_AbsoluteNBO));
377 375 GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)],
376 key,
377 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey));
378 GNUNET_CRYPTO_pow_hash ("gnunet-revocation-proof-of-work", 378 GNUNET_CRYPTO_pow_hash ("gnunet-revocation-proof-of-work",
379 buf, 379 buf,
380 sizeof(buf), 380 sizeof(buf),