diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-04-20 18:33:43 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-04-20 18:33:43 +0200 |
commit | 424cd50ecd0144b264a547fe149839cf2866c21f (patch) | |
tree | 373a8f4fd6aa8b993cfb388601b05d54bd6b8799 /src/revocation/revocation_api.c | |
parent | 24d5d46ade3ad70889855cdbe3a1a61754bdfb92 (diff) | |
download | gnunet-424cd50ecd0144b264a547fe149839cf2866c21f.tar.gz gnunet-424cd50ecd0144b264a547fe149839cf2866c21f.zip |
check signature in check_pow
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r-- | src/revocation/revocation_api.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 771bcb92d..2979e7400 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -424,6 +424,20 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_REVOCATION_Pow *pow, | |||
424 | uint64_t pow_val; | 424 | uint64_t pow_val; |
425 | 425 | ||
426 | /** | 426 | /** |
427 | * Check if signature valid | ||
428 | */ | ||
429 | if (GNUNET_OK != | ||
430 | GNUNET_CRYPTO_ecdsa_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION, | ||
431 | &pow->purpose, | ||
432 | &pow->signature, | ||
433 | &pow->key)) | ||
434 | { | ||
435 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
436 | "Proof of work signature invalid!\n"); | ||
437 | return -1; | ||
438 | } | ||
439 | |||
440 | /** | ||
427 | * First, check if any duplicates are in the PoW set | 441 | * First, check if any duplicates are in the PoW set |
428 | */ | 442 | */ |
429 | for (unsigned int i = 0; i < POW_COUNT; i++) | 443 | for (unsigned int i = 0; i < POW_COUNT; i++) |