aboutsummaryrefslogtreecommitdiff
path: root/src/credential/gnunet-credential.c
diff options
context:
space:
mode:
authorAndreas Ebner <pansy007@googlemail.com>2019-08-25 12:23:33 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:17:29 +0200
commitd4790594a33a4688641f66841f05533b3c0956b9 (patch)
treeee136e65e4154a7d4bb6eb947f19b631329cdce2 /src/credential/gnunet-credential.c
parent418b7f2cef91e344672edf3926b82a5a3043e9ba (diff)
downloadgnunet-d4790594a33a4688641f66841f05533b3c0956b9.tar.gz
gnunet-d4790594a33a4688641f66841f05533b3c0956b9.zip
Introduction of intermediate result reporting, removed some stuff, new test:
- new message, message type and api function to handle intermediate result reporting - removed GNUNET_SIGNATURE_PURPOSE_CREDENTIAL completely and the one usage that was still around - new test: AND with both parts having a bidirectional forward match
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r--src/credential/gnunet-credential.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c
index f2d967eea..aa9828d4b 100644
--- a/src/credential/gnunet-credential.c
+++ b/src/credential/gnunet-credential.c
@@ -264,6 +264,17 @@ do_timeout (void *cls)
264} 264}
265 265
266static void 266static void
267handle_intermediate_result(void *cls,
268struct GNUNET_CREDENTIAL_Delegation *dd)
269{
270 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Intermediate result: %s.%s <- %s.%s\n",
271 GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->issuer_key),
272 dd->issuer_attribute,
273 GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->subject_key),
274 dd->subject_attribute);
275}
276
277static void
267handle_collect_result (void *cls, 278handle_collect_result (void *cls,
268 unsigned int d_count, 279 unsigned int d_count,
269 struct GNUNET_CREDENTIAL_Delegation *dc, 280 struct GNUNET_CREDENTIAL_Delegation *dc,
@@ -395,7 +406,9 @@ identity_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
395 privkey, 406 privkey,
396 direction, 407 direction,
397 &handle_collect_result, 408 &handle_collect_result,
398 NULL); 409 NULL,
410 &handle_intermediate_result,
411 NULL);
399 return; 412 return;
400 } 413 }
401 GNUNET_SCHEDULER_shutdown (); 414 GNUNET_SCHEDULER_shutdown ();
@@ -901,7 +914,9 @@ run (void *cls,
901 delegates, 914 delegates,
902 direction, 915 direction,
903 &handle_verify_result, 916 &handle_verify_result,
904 NULL); 917 NULL,
918 &handle_intermediate_result,
919 NULL);
905 for (i = 0; i < count; i++) 920 for (i = 0; i < count; i++)
906 { 921 {
907 GNUNET_free ((char *) delegates[i].issuer_attribute); 922 GNUNET_free ((char *) delegates[i].issuer_attribute);