diff options
author | jospaeth <spaethj@in.tum.de> | 2020-09-02 12:59:54 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-09-02 12:59:54 +0200 |
commit | db702fdd245d35599d873f5de33ba886256295a6 (patch) | |
tree | d1d333d7798a47e2e0fff902b3dfc3aa98eabdcf /src/escrow/plugin_escrow_gns.c | |
parent | a5770a6b2c43b49e35482115a04d638dacfaa929 (diff) | |
download | gnunet-db702fdd245d35599d873f5de33ba886256295a6.tar.gz gnunet-db702fdd245d35599d873f5de33ba886256295a6.zip |
rename escrowAnchor to anchor
Diffstat (limited to 'src/escrow/plugin_escrow_gns.c')
-rw-r--r-- | src/escrow/plugin_escrow_gns.c | 28 |
1 files changed, 14 insertions, 14 deletions
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 | ||
1321 | static void | 1321 | static void |
1322 | restore_private_key (struct ESCROW_PluginOperationWrapper *plugin_op_wrap, | 1322 | restore_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, | |||
1436 | struct ESCROW_PluginOperationWrapper * | 1436 | struct ESCROW_PluginOperationWrapper * |
1437 | verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, | 1437 | verify_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 | ||