aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-02 12:59:54 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-02 12:59:54 +0200
commitdb702fdd245d35599d873f5de33ba886256295a6 (patch)
treed1d333d7798a47e2e0fff902b3dfc3aa98eabdcf
parenta5770a6b2c43b49e35482115a04d638dacfaa929 (diff)
downloadgnunet-db702fdd245d35599d873f5de33ba886256295a6.tar.gz
gnunet-db702fdd245d35599d873f5de33ba886256295a6.zip
rename escrowAnchor to anchor
-rw-r--r--src/escrow/escrow.h2
-rw-r--r--src/escrow/escrow_api.c20
-rw-r--r--src/escrow/gnunet-escrow.c6
-rw-r--r--src/escrow/plugin_escrow_anastasis.c6
-rw-r--r--src/escrow/plugin_escrow_gns.c28
-rw-r--r--src/escrow/plugin_escrow_plaintext.c14
-rw-r--r--src/include/gnunet_escrow_lib.h12
-rw-r--r--src/include/gnunet_escrow_plugin.h4
8 files changed, 46 insertions, 46 deletions
diff --git a/src/escrow/escrow.h b/src/escrow/escrow.h
index cf3660e03..1f5257970 100644
--- a/src/escrow/escrow.h
+++ b/src/escrow/escrow.h
@@ -169,7 +169,7 @@ struct ESCROW_Plugin_AnchorContinuationWrapper
169 /** 169 /**
170 * The escrow anchor 170 * The escrow anchor
171 */ 171 */
172 struct GNUNET_ESCROW_Anchor *escrowAnchor; 172 struct GNUNET_ESCROW_Anchor *anchor;
173 173
174 /** 174 /**
175 * The unique ID of the respective ESCROW_Operation 175 * The unique ID of the respective ESCROW_Operation
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c
index 5bd615c2d..4b3f5e68d 100644
--- a/src/escrow/escrow_api.c
+++ b/src/escrow/escrow_api.c
@@ -245,7 +245,7 @@ handle_start_escrow_result (void *cls)
245 } 245 }
246 GNUNET_CONTAINER_DLL_remove (w->h->op_head, w->h->op_tail, op); 246 GNUNET_CONTAINER_DLL_remove (w->h->op_head, w->h->op_tail, op);
247 if (NULL != op->cb_put) 247 if (NULL != op->cb_put)
248 op->cb_put (op->cb_cls, w->escrowAnchor, w->emsg); 248 op->cb_put (op->cb_cls, w->anchor, w->emsg);
249 GNUNET_free (op); 249 GNUNET_free (op);
250} 250}
251 251
@@ -378,7 +378,7 @@ handle_verify_escrow_result (void *cls)
378 * 378 *
379 * @param h the handle for the escrow component 379 * @param h the handle for the escrow component
380 * @param ego the identity ego that was put into escrow 380 * @param ego the identity ego that was put into escrow
381 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method 381 * @param anchor the escrow anchor returned by the GNUNET_ESCROW_put method
382 * @param method the escrow method to use 382 * @param method the escrow method to use
383 * @param cb function to call with the verification result on completion 383 * @param cb function to call with the verification result on completion
384 * @param cb_cls closure for @a cb 384 * @param cb_cls closure for @a cb
@@ -388,7 +388,7 @@ handle_verify_escrow_result (void *cls)
388struct GNUNET_ESCROW_Operation * 388struct GNUNET_ESCROW_Operation *
389GNUNET_ESCROW_verify (struct GNUNET_ESCROW_Handle *h, 389GNUNET_ESCROW_verify (struct GNUNET_ESCROW_Handle *h,
390 struct GNUNET_IDENTITY_Ego *ego, 390 struct GNUNET_IDENTITY_Ego *ego,
391 struct GNUNET_ESCROW_Anchor *escrowAnchor, 391 struct GNUNET_ESCROW_Anchor *anchor,
392 enum GNUNET_ESCROW_Key_Escrow_Method method, 392 enum GNUNET_ESCROW_Key_Escrow_Method method,
393 GNUNET_ESCROW_VerifyContinuation cb, 393 GNUNET_ESCROW_VerifyContinuation cb,
394 void *cb_cls) 394 void *cb_cls)
@@ -405,7 +405,7 @@ GNUNET_ESCROW_verify (struct GNUNET_ESCROW_Handle *h,
405 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); 405 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op);
406 406
407 api = init_plugin (h, method); 407 api = init_plugin (h, method);
408 op->plugin_op_wrap = api->verify_key_escrow (h, ego, escrowAnchor, &handle_verify_escrow_result, op->id); 408 op->plugin_op_wrap = api->verify_key_escrow (h, ego, anchor, &handle_verify_escrow_result, op->id);
409 409
410 return op; 410 return op;
411} 411}
@@ -511,23 +511,23 @@ GNUNET_ESCROW_anchor_string_to_data (const char *anchorString)
511/** 511/**
512 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string 512 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string
513 * 513 *
514 * @param escrowAnchor the escrow anchor struct 514 * @param anchor the escrow anchor struct
515 * 515 *
516 * @return the encoded escrow anchor string 516 * @return the encoded escrow anchor string
517 */ 517 */
518char * 518char *
519GNUNET_ESCROW_anchor_data_to_string (const struct GNUNET_ESCROW_Anchor *escrowAnchor) 519GNUNET_ESCROW_anchor_data_to_string (const struct GNUNET_ESCROW_Anchor *anchor)
520{ 520{
521 char *anchorString, *ptr; 521 char *anchorString, *ptr;
522 const char *methodString, *egoNameString, *anchorData; 522 const char *methodString, *egoNameString, *anchorData;
523 char *methodStringEnc, *egoNameStringEnc, *anchorDataEnc; 523 char *methodStringEnc, *egoNameStringEnc, *anchorDataEnc;
524 524
525 methodString = GNUNET_ESCROW_method_number_to_string (escrowAnchor->method); 525 methodString = GNUNET_ESCROW_method_number_to_string (anchor->method);
526 GNUNET_STRINGS_urlencode (methodString, strlen (methodString), &methodStringEnc); 526 GNUNET_STRINGS_urlencode (methodString, strlen (methodString), &methodStringEnc);
527 egoNameString = escrowAnchor->egoName; 527 egoNameString = anchor->egoName;
528 GNUNET_STRINGS_urlencode (egoNameString, strlen (egoNameString), &egoNameStringEnc); 528 GNUNET_STRINGS_urlencode (egoNameString, strlen (egoNameString), &egoNameStringEnc);
529 anchorData = (const char *)&escrowAnchor[1]; 529 anchorData = (const char *)&anchor[1];
530 GNUNET_STRINGS_urlencode (anchorData, escrowAnchor->size, &anchorDataEnc); 530 GNUNET_STRINGS_urlencode (anchorData, anchor->size, &anchorDataEnc);
531 531
532 anchorString = GNUNET_malloc (strlen (methodStringEnc) + 1 532 anchorString = GNUNET_malloc (strlen (methodStringEnc) + 1
533 + strlen (egoNameStringEnc) + 1 533 + strlen (egoNameStringEnc) + 1
diff --git a/src/escrow/gnunet-escrow.c b/src/escrow/gnunet-escrow.c
index e66c43046..36728f949 100644
--- a/src/escrow/gnunet-escrow.c
+++ b/src/escrow/gnunet-escrow.c
@@ -194,14 +194,14 @@ do_cleanup (void *cls)
194 194
195static void 195static void
196put_cb (void *cls, 196put_cb (void *cls,
197 struct GNUNET_ESCROW_Anchor *escrowAnchor, 197 struct GNUNET_ESCROW_Anchor *anchor,
198 const char *emsg) 198 const char *emsg)
199{ 199{
200 char *anchorString; 200 char *anchorString;
201 201
202 escrow_op = NULL; 202 escrow_op = NULL;
203 203
204 if (NULL == escrowAnchor) 204 if (NULL == anchor)
205 { 205 {
206 ret = 1; 206 ret = 1;
207 if (NULL != emsg) 207 if (NULL != emsg)
@@ -209,7 +209,7 @@ put_cb (void *cls,
209 } 209 }
210 else 210 else
211 { 211 {
212 anchorString = GNUNET_ESCROW_anchor_data_to_string (escrowAnchor); 212 anchorString = GNUNET_ESCROW_anchor_data_to_string (anchor);
213 213
214 fprintf (stdout, "Escrow finished! Please keep the following anchor " 214 fprintf (stdout, "Escrow finished! Please keep the following anchor "
215 "in order to restore the key later!\n%s\n", anchorString); 215 "in order to restore the key later!\n%s\n", anchorString);
diff --git a/src/escrow/plugin_escrow_anastasis.c b/src/escrow/plugin_escrow_anastasis.c
index 0c96d8d8d..68be45867 100644
--- a/src/escrow/plugin_escrow_anastasis.c
+++ b/src/escrow/plugin_escrow_anastasis.c
@@ -67,7 +67,7 @@ start_anastasis_key_escrow (struct GNUNET_ESCROW_Handle *h,
67 w->op_id = op_id; 67 w->op_id = op_id;
68 68
69 // TODO: implement 69 // TODO: implement
70 w->escrowAnchor = NULL; 70 w->anchor = NULL;
71 w->emsg = _ ("Anastasis escrow is not yet implemented!\n"); 71 w->emsg = _ ("Anastasis escrow is not yet implemented!\n");
72 GNUNET_SCHEDULER_add_now (cb, w); 72 GNUNET_SCHEDULER_add_now (cb, w);
73 return NULL; 73 return NULL;
@@ -79,7 +79,7 @@ start_anastasis_key_escrow (struct GNUNET_ESCROW_Handle *h,
79 * 79 *
80 * @param h the handle for the escrow component 80 * @param h the handle for the escrow component
81 * @param ego the identity ego containing the private key 81 * @param ego the identity ego containing the private key
82 * @param escrowAnchor the escrow anchor needed to restore the key 82 * @param anchor the escrow anchor needed to restore the key
83 * @param cb the function called upon completion 83 * @param cb the function called upon completion
84 * @param op_id unique ID of the respective ESCROW_Operation 84 * @param op_id unique ID of the respective ESCROW_Operation
85 * 85 *
@@ -88,7 +88,7 @@ start_anastasis_key_escrow (struct GNUNET_ESCROW_Handle *h,
88struct ESCROW_PluginOperationWrapper * 88struct ESCROW_PluginOperationWrapper *
89verify_anastasis_key_escrow (struct GNUNET_ESCROW_Handle *h, 89verify_anastasis_key_escrow (struct GNUNET_ESCROW_Handle *h,
90 struct GNUNET_IDENTITY_Ego *ego, 90 struct GNUNET_IDENTITY_Ego *ego,
91 struct GNUNET_ESCROW_Anchor *escrowAnchor, 91 struct GNUNET_ESCROW_Anchor *anchor,
92 GNUNET_SCHEDULER_TaskCallback cb, 92 GNUNET_SCHEDULER_TaskCallback cb,
93 uint32_t op_id) 93 uint32_t op_id)
94{ 94{
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c
index a3a3cc81b..16dc95bea 100644
--- a/src/escrow/plugin_escrow_gns.c
+++ b/src/escrow/plugin_escrow_gns.c
@@ -532,7 +532,7 @@ keyshare_distribution_finished (void *cls)
532 anchor->size = anchorDataSize; 532 anchor->size = anchorDataSize;
533 GNUNET_memcpy (&anchor[1], p_op->userSecret, anchorDataSize); 533 GNUNET_memcpy (&anchor[1], p_op->userSecret, anchorDataSize);
534 534
535 p_op->anchor_wrap->escrowAnchor = anchor; 535 p_op->anchor_wrap->anchor = anchor;
536 536
537 /* set the last escrow time */ 537 /* set the last escrow time */
538 ESCROW_update_escrow_status (p_op->h, p_op->ego, "gns"); 538 ESCROW_update_escrow_status (p_op->h, p_op->ego, "gns");
@@ -566,7 +566,7 @@ keyshare_distributed (void *cls,
566 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 566 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
567 "Failed to store keyshare %s\n", 567 "Failed to store keyshare %s\n",
568 emsg); 568 emsg);
569 p_op->anchor_wrap->escrowAnchor = NULL; 569 p_op->anchor_wrap->anchor = NULL;
570 p_op->anchor_wrap->emsg = _ ("Keyshare distribution failed!\n"); 570 p_op->anchor_wrap->emsg = _ ("Keyshare distribution failed!\n");
571 p_op->cont (p_op->anchor_wrap); 571 p_op->cont (p_op->anchor_wrap);
572 // this also cancels all running namestore operations 572 // this also cancels all running namestore operations
@@ -662,7 +662,7 @@ escrow_ids_finished (struct ESCROW_PluginOperationWrapper *plugin_op_wrap)
662 keyshares = split_private_key (p_op); 662 keyshares = split_private_key (p_op);
663 if (NULL == keyshares) 663 if (NULL == keyshares)
664 { 664 {
665 p_op->anchor_wrap->escrowAnchor = NULL; 665 p_op->anchor_wrap->anchor = NULL;
666 p_op->anchor_wrap->emsg = _ ("Failed to split the key!\n"); 666 p_op->anchor_wrap->emsg = _ ("Failed to split the key!\n");
667 start_cont (plugin_op_wrap); 667 start_cont (plugin_op_wrap);
668 return; 668 return;
@@ -671,7 +671,7 @@ escrow_ids_finished (struct ESCROW_PluginOperationWrapper *plugin_op_wrap)
671 /* distribute the shares to the identities */ 671 /* distribute the shares to the identities */
672 if (GNUNET_OK != distribute_keyshares (plugin_op_wrap, keyshares)) 672 if (GNUNET_OK != distribute_keyshares (plugin_op_wrap, keyshares))
673 { 673 {
674 p_op->anchor_wrap->escrowAnchor = NULL; 674 p_op->anchor_wrap->anchor = NULL;
675 p_op->anchor_wrap->emsg = _ ("Failed to distribute the keyshares!\n"); 675 p_op->anchor_wrap->emsg = _ ("Failed to distribute the keyshares!\n");
676 start_cont (plugin_op_wrap); 676 start_cont (plugin_op_wrap);
677 return; 677 return;
@@ -708,7 +708,7 @@ escrow_id_created (void *cls,
708 } 708 }
709 else 709 else
710 p_op->anchor_wrap->emsg = _ ("Failed to create ego!\n"); 710 p_op->anchor_wrap->emsg = _ ("Failed to create ego!\n");
711 p_op->anchor_wrap->escrowAnchor = NULL; 711 p_op->anchor_wrap->anchor = NULL;
712 p_op->cont (p_op->anchor_wrap); 712 p_op->cont (p_op->anchor_wrap);
713 // this also cancels all running identity operations 713 // this also cancels all running identity operations
714 cleanup_plugin_operation (plugin_op_wrap); 714 cleanup_plugin_operation (plugin_op_wrap);
@@ -851,7 +851,7 @@ handle_existing_wrong_ego_deletion (void *cls,
851 "Identity create operation returned with error: %s\n", 851 "Identity create operation returned with error: %s\n",
852 emsg); 852 emsg);
853 p_op->anchor_wrap->emsg = _ ("Identity delete of wrong existing ego failed!\n"); 853 p_op->anchor_wrap->emsg = _ ("Identity delete of wrong existing ego failed!\n");
854 p_op->anchor_wrap->escrowAnchor = NULL; 854 p_op->anchor_wrap->anchor = NULL;
855 p_op->cont (p_op->anchor_wrap); 855 p_op->cont (p_op->anchor_wrap);
856 // this also cancels all running identity operations 856 // this also cancels all running identity operations
857 cleanup_plugin_operation (plugin_op_wrap); 857 cleanup_plugin_operation (plugin_op_wrap);
@@ -960,7 +960,7 @@ handle_config_load_error (struct ESCROW_PluginOperationWrapper *plugin_op_wrap,
960 960
961 if (NULL != p_op->anchor_wrap) 961 if (NULL != p_op->anchor_wrap)
962 { 962 {
963 p_op->anchor_wrap->escrowAnchor = NULL; 963 p_op->anchor_wrap->anchor = NULL;
964 p_op->anchor_wrap->emsg = emsg; 964 p_op->anchor_wrap->emsg = emsg;
965 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap); 965 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap);
966 return; 966 return;
@@ -1090,7 +1090,7 @@ start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1090 1090
1091 if (NULL == ego || NULL == userSecret) 1091 if (NULL == ego || NULL == userSecret)
1092 { 1092 {
1093 w->escrowAnchor = NULL; 1093 w->anchor = NULL;
1094 if (NULL == ego) 1094 if (NULL == ego)
1095 w->emsg = _ ("ESCROW_put was called with ego == NULL\n"); 1095 w->emsg = _ ("ESCROW_put was called with ego == NULL\n");
1096 else if (NULL == userSecret) 1096 else if (NULL == userSecret)
@@ -1320,7 +1320,7 @@ get_user_secret_from_anchor (const struct GNUNET_ESCROW_Anchor *anchor)
1320 1320
1321static void 1321static void
1322restore_private_key (struct ESCROW_PluginOperationWrapper *plugin_op_wrap, 1322restore_private_key (struct ESCROW_PluginOperationWrapper *plugin_op_wrap,
1323 struct GNUNET_ESCROW_Anchor *escrowAnchor, // TODO: use escrowAnchor?? 1323 struct GNUNET_ESCROW_Anchor *anchor, // TODO: use anchor??
1324 PkContinuation cont, 1324 PkContinuation cont,
1325 void *cont_cls) 1325 void *cont_cls)
1326{ 1326{
@@ -1427,7 +1427,7 @@ verify_restored_pk (void *cls,
1427 * 1427 *
1428 * @param h the handle for the escrow component 1428 * @param h the handle for the escrow component
1429 * @param ego the identity ego containing the private key 1429 * @param ego the identity ego containing the private key
1430 * @param escrowAnchor the escrow anchor needed to restore the key 1430 * @param anchor the escrow anchor needed to restore the key
1431 * @param cb the function called upon completion 1431 * @param cb the function called upon completion
1432 * @param op_id unique ID of the respective ESCROW_Operation 1432 * @param op_id unique ID of the respective ESCROW_Operation
1433 * 1433 *
@@ -1436,7 +1436,7 @@ verify_restored_pk (void *cls,
1436struct ESCROW_PluginOperationWrapper * 1436struct ESCROW_PluginOperationWrapper *
1437verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, 1437verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1438 struct GNUNET_IDENTITY_Ego *ego, 1438 struct GNUNET_IDENTITY_Ego *ego,
1439 struct GNUNET_ESCROW_Anchor *escrowAnchor, 1439 struct GNUNET_ESCROW_Anchor *anchor,
1440 GNUNET_SCHEDULER_TaskCallback cb, 1440 GNUNET_SCHEDULER_TaskCallback cb,
1441 uint32_t op_id) 1441 uint32_t op_id)
1442{ 1442{
@@ -1456,7 +1456,7 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1456 p_op->cont = cb; 1456 p_op->cont = cb;
1457 p_op->ego = ego; 1457 p_op->ego = ego;
1458 p_op->egoName = GNUNET_strdup (ego->name); 1458 p_op->egoName = GNUNET_strdup (ego->name);
1459 p_op->userSecret = get_user_secret_from_anchor (escrowAnchor); 1459 p_op->userSecret = get_user_secret_from_anchor (anchor);
1460 1460
1461 w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper); 1461 w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper);
1462 w->h = h; 1462 w->h = h;
@@ -1470,7 +1470,7 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1470 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); 1470 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
1471 return plugin_op_wrap; 1471 return plugin_op_wrap;
1472 } 1472 }
1473 if (0 != strcmp (ego->name, escrowAnchor->egoName)) 1473 if (0 != strcmp (ego->name, anchor->egoName))
1474 { 1474 {
1475 w->verificationResult = GNUNET_ESCROW_INVALID; 1475 w->verificationResult = GNUNET_ESCROW_INVALID;
1476 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n"); 1476 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n");
@@ -1483,7 +1483,7 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1483 return plugin_op_wrap; 1483 return plugin_op_wrap;
1484 1484
1485 restore_private_key (plugin_op_wrap, 1485 restore_private_key (plugin_op_wrap,
1486 escrowAnchor, 1486 anchor,
1487 &verify_restored_pk, 1487 &verify_restored_pk,
1488 plugin_op_wrap); 1488 plugin_op_wrap);
1489 1489
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c
index b26653667..f629ac452 100644
--- a/src/escrow/plugin_escrow_plaintext.c
+++ b/src/escrow/plugin_escrow_plaintext.c
@@ -171,7 +171,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
171 171
172 if (NULL == ego) 172 if (NULL == ego)
173 { 173 {
174 w->escrowAnchor = NULL; 174 w->anchor = NULL;
175 w->emsg = _ ("ESCROW_put was called with ego == NULL!\n"); 175 w->emsg = _ ("ESCROW_put was called with ego == NULL!\n");
176 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap); 176 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap);
177 return plugin_op_wrap; 177 return plugin_op_wrap;
@@ -186,7 +186,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
186 anchor->size = anchorDataSize; 186 anchor->size = anchorDataSize;
187 GNUNET_memcpy (&anchor[1], pkString, anchorDataSize); 187 GNUNET_memcpy (&anchor[1], pkString, anchorDataSize);
188 188
189 w->escrowAnchor = anchor; 189 w->anchor = anchor;
190 190
191 /* set the last escrow time */ 191 /* set the last escrow time */
192 ESCROW_update_escrow_status (h, ego, "plaintext"); 192 ESCROW_update_escrow_status (h, ego, "plaintext");
@@ -214,7 +214,7 @@ verify_cont (void *cls)
214 * 214 *
215 * @param h the handle for the escrow component 215 * @param h the handle for the escrow component
216 * @param ego the identity ego containing the private key 216 * @param ego the identity ego containing the private key
217 * @param escrowAnchor the escrow anchor needed to restore the key 217 * @param anchor the escrow anchor needed to restore the key
218 * @param cb the function called upon completion 218 * @param cb the function called upon completion
219 * @param op_id unique ID of the respective ESCROW_Operation 219 * @param op_id unique ID of the respective ESCROW_Operation
220 * 220 *
@@ -223,7 +223,7 @@ verify_cont (void *cls)
223struct ESCROW_PluginOperationWrapper * 223struct ESCROW_PluginOperationWrapper *
224verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, 224verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
225 struct GNUNET_IDENTITY_Ego *ego, 225 struct GNUNET_IDENTITY_Ego *ego,
226 struct GNUNET_ESCROW_Anchor *escrowAnchor, 226 struct GNUNET_ESCROW_Anchor *anchor,
227 ESCROW_Plugin_Continuation cb, 227 ESCROW_Plugin_Continuation cb,
228 uint32_t op_id) 228 uint32_t op_id)
229{ 229{
@@ -257,7 +257,7 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
257 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); 257 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
258 return plugin_op_wrap; 258 return plugin_op_wrap;
259 } 259 }
260 if (0 != strcmp (ego->name, escrowAnchor->egoName)) 260 if (0 != strcmp (ego->name, anchor->egoName))
261 { 261 {
262 w->verificationResult = GNUNET_ESCROW_INVALID; 262 w->verificationResult = GNUNET_ESCROW_INVALID;
263 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n"); 263 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n");
@@ -267,8 +267,8 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
267 pk = GNUNET_IDENTITY_ego_get_private_key (ego); 267 pk = GNUNET_IDENTITY_ego_get_private_key (ego);
268 pkString = GNUNET_CRYPTO_ecdsa_private_key_to_string (pk); 268 pkString = GNUNET_CRYPTO_ecdsa_private_key_to_string (pk);
269 verificationResult = strncmp (pkString, 269 verificationResult = strncmp (pkString,
270 (char *)&escrowAnchor[1], 270 (char *)&anchor[1],
271 escrowAnchor->size) == 0 ? 271 anchor->size) == 0 ?
272 GNUNET_ESCROW_VALID : GNUNET_ESCROW_INVALID; 272 GNUNET_ESCROW_VALID : GNUNET_ESCROW_INVALID;
273 273
274 w->verificationResult = verificationResult; 274 w->verificationResult = verificationResult;
diff --git a/src/include/gnunet_escrow_lib.h b/src/include/gnunet_escrow_lib.h
index 56bd56032..3d3e39664 100644
--- a/src/include/gnunet_escrow_lib.h
+++ b/src/include/gnunet_escrow_lib.h
@@ -125,12 +125,12 @@ typedef void (*GNUNET_ESCROW_EgoCreateContinuation) (
125 * Continuation for PUT operations. 125 * Continuation for PUT operations.
126 * 126 *
127 * @param cls closure 127 * @param cls closure
128 * @param escrowAnchor the escrow anchor needed to get the data back 128 * @param anchor the escrow anchor needed to get the data back
129 * @param emsg error message, NULL on success 129 * @param emsg error message, NULL on success
130 */ 130 */
131typedef void (*GNUNET_ESCROW_AnchorContinuation) ( 131typedef void (*GNUNET_ESCROW_AnchorContinuation) (
132 void *cls, 132 void *cls,
133 struct GNUNET_ESCROW_Anchor *escrowAnchor, 133 struct GNUNET_ESCROW_Anchor *anchor,
134 const char *emsg); 134 const char *emsg);
135 135
136/** 136/**
@@ -331,7 +331,7 @@ GNUNET_ESCROW_get (
331 * 331 *
332 * @param h the handle for the escrow component 332 * @param h the handle for the escrow component
333 * @param ego the identity ego that was put into escrow 333 * @param ego the identity ego that was put into escrow
334 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method 334 * @param anchor the escrow anchor returned by the GNUNET_ESCROW_put method
335 * @param method the escrow method to use 335 * @param method the escrow method to use
336 * @param cb function to call with the verification result on completion 336 * @param cb function to call with the verification result on completion
337 * @param cb_cls closure for @a cb 337 * @param cb_cls closure for @a cb
@@ -342,7 +342,7 @@ struct GNUNET_ESCROW_Operation *
342GNUNET_ESCROW_verify ( 342GNUNET_ESCROW_verify (
343 struct GNUNET_ESCROW_Handle *h, 343 struct GNUNET_ESCROW_Handle *h,
344 struct GNUNET_IDENTITY_Ego *ego, 344 struct GNUNET_IDENTITY_Ego *ego,
345 struct GNUNET_ESCROW_Anchor *escrowAnchor, 345 struct GNUNET_ESCROW_Anchor *anchor,
346 enum GNUNET_ESCROW_Key_Escrow_Method method, 346 enum GNUNET_ESCROW_Key_Escrow_Method method,
347 GNUNET_ESCROW_VerifyContinuation cb, 347 GNUNET_ESCROW_VerifyContinuation cb,
348 void *cb_cls); 348 void *cb_cls);
@@ -386,13 +386,13 @@ GNUNET_ESCROW_anchor_string_to_data (
386/** 386/**
387 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string 387 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string
388 * 388 *
389 * @param escrowAnchor the escrow anchor struct 389 * @param anchor the escrow anchor struct
390 * 390 *
391 * @return the encoded escrow anchor string 391 * @return the encoded escrow anchor string
392 */ 392 */
393char * 393char *
394GNUNET_ESCROW_anchor_data_to_string ( 394GNUNET_ESCROW_anchor_data_to_string (
395 const struct GNUNET_ESCROW_Anchor *escrowAnchor); 395 const struct GNUNET_ESCROW_Anchor *anchor);
396 396
397 397
398/** 398/**
diff --git a/src/include/gnunet_escrow_plugin.h b/src/include/gnunet_escrow_plugin.h
index dbdf6dce6..3095d3616 100644
--- a/src/include/gnunet_escrow_plugin.h
+++ b/src/include/gnunet_escrow_plugin.h
@@ -68,7 +68,7 @@ typedef struct ESCROW_PluginOperationWrapper *(*GNUNET_ESCROW_StartKeyEscrowFunc
68 * 68 *
69 * @param h the handle for the escrow component 69 * @param h the handle for the escrow component
70 * @param ego the identity ego containing the private key 70 * @param ego the identity ego containing the private key
71 * @param escrowAnchor the escrow anchor needed to restore the key 71 * @param anchor the escrow anchor needed to restore the key
72 * @param cb the function called upon completion 72 * @param cb the function called upon completion
73 * @param op_id unique ID of the respective ESCROW_Operation 73 * @param op_id unique ID of the respective ESCROW_Operation
74 * 74 *
@@ -77,7 +77,7 @@ typedef struct ESCROW_PluginOperationWrapper *(*GNUNET_ESCROW_StartKeyEscrowFunc
77typedef struct ESCROW_PluginOperationWrapper *(*GNUNET_ESCROW_VerifyKeyEscrowFunction) ( 77typedef struct ESCROW_PluginOperationWrapper *(*GNUNET_ESCROW_VerifyKeyEscrowFunction) (
78 struct GNUNET_ESCROW_Handle *h, 78 struct GNUNET_ESCROW_Handle *h,
79 struct GNUNET_IDENTITY_Ego *ego, 79 struct GNUNET_IDENTITY_Ego *ego,
80 struct GNUNET_ESCROW_Anchor *escrowAnchor, 80 struct GNUNET_ESCROW_Anchor *anchor,
81 GNUNET_SCHEDULER_TaskCallback cb, 81 GNUNET_SCHEDULER_TaskCallback cb,
82 uint32_t op_id); 82 uint32_t op_id);
83 83