aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/block_regex.h2
-rw-r--r--src/regex/plugin_block_regex.c2
-rw-r--r--src/regex/regex_internal_dht.c9
3 files changed, 5 insertions, 8 deletions
diff --git a/src/include/block_regex.h b/src/include/block_regex.h
index 85d450212..8e43c2377 100644
--- a/src/include/block_regex.h
+++ b/src/include/block_regex.h
@@ -67,7 +67,7 @@ struct RegexAcceptBlock
67 /** 67 /**
68 * Public key of the peer signing. 68 * Public key of the peer signing.
69 */ 69 */
70 struct GNUNET_CRYPTO_EccPublicSignKey public_key; 70 struct GNUNET_PeerIdentity peer;
71 71
72 /** 72 /**
73 * The signature. 73 * The signature.
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index 4dda893c9..0897641d5 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -189,7 +189,7 @@ evaluate_block_regex_accept (void *cls, enum GNUNET_BLOCK_Type type,
189 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT, 189 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT,
190 &rba->purpose, 190 &rba->purpose,
191 &rba->signature, 191 &rba->signature,
192 &rba->public_key)) 192 &rba->peer.public_key))
193 { 193 {
194 GNUNET_break_op(0); 194 GNUNET_break_op(0);
195 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 195 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index 3501cece0..ef0155177 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -121,7 +121,8 @@ regex_iterator (void *cls,
121 ab.purpose.purpose = ntohl (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT); 121 ab.purpose.purpose = ntohl (GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT);
122 ab.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_DHT_MAX_EXPIRATION)); 122 ab.expiration_time = GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_DHT_MAX_EXPIRATION));
123 ab.key = *key; 123 ab.key = *key;
124 GNUNET_CRYPTO_ecc_key_get_public_for_signature (h->priv, &ab.public_key); 124 GNUNET_CRYPTO_ecc_key_get_public_for_signature (h->priv,
125 &ab.peer.public_key);
125 GNUNET_assert (GNUNET_OK == 126 GNUNET_assert (GNUNET_OK ==
126 GNUNET_CRYPTO_ecc_sign (h->priv, 127 GNUNET_CRYPTO_ecc_sign (h->priv,
127 &ab.purpose, 128 &ab.purpose,
@@ -373,7 +374,6 @@ dht_get_string_accept_handler (void *cls, struct GNUNET_TIME_Absolute exp,
373 const struct RegexAcceptBlock *block = data; 374 const struct RegexAcceptBlock *block = data;
374 struct RegexSearchContext *ctx = cls; 375 struct RegexSearchContext *ctx = cls;
375 struct REGEX_INTERNAL_Search *info = ctx->info; 376 struct REGEX_INTERNAL_Search *info = ctx->info;
376 struct GNUNET_PeerIdentity pid;
377 377
378 LOG (GNUNET_ERROR_TYPE_DEBUG, 378 LOG (GNUNET_ERROR_TYPE_DEBUG,
379 "Regex result accept for %s (key %s)\n", 379 "Regex result accept for %s (key %s)\n",
@@ -385,11 +385,8 @@ dht_get_string_accept_handler (void *cls, struct GNUNET_TIME_Absolute exp,
385 GNUNET_STATISTICS_update (info->stats, 385 GNUNET_STATISTICS_update (info->stats,
386 "# regex accepting block bytes found", 386 "# regex accepting block bytes found",
387 size, GNUNET_NO); 387 size, GNUNET_NO);
388 GNUNET_CRYPTO_hash (&block->public_key,
389 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
390 &pid.hashPubKey);
391 info->callback (info->callback_cls, 388 info->callback (info->callback_cls,
392 &pid, 389 &block->peer,
393 get_path, get_path_length, 390 get_path, get_path_length,
394 put_path, put_path_length); 391 put_path, put_path_length);
395} 392}