aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_gns.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-08-12 14:41:30 +0200
committerjospaeth <spaethj@in.tum.de>2020-08-12 14:41:30 +0200
commitd08272011c55477a455d7ad0c316a5b8a98d69b3 (patch)
tree6e740d504fe7c8c50660bbd5f40cc462aad42af1 /src/escrow/plugin_escrow_gns.c
parent2c21c75bd151d9265f5cca2fab721a16afff7e10 (diff)
downloadgnunet-d08272011c55477a455d7ad0c316a5b8a98d69b3.tar.gz
gnunet-d08272011c55477a455d7ad0c316a5b8a98d69b3.zip
finish escrow put for GNS
some minor fixes needed
Diffstat (limited to 'src/escrow/plugin_escrow_gns.c')
-rw-r--r--src/escrow/plugin_escrow_gns.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c
index 306dd5d83..aa5875dff 100644
--- a/src/escrow/plugin_escrow_gns.c
+++ b/src/escrow/plugin_escrow_gns.c
@@ -306,9 +306,11 @@ keyshare_distribution_finished (struct ESCROW_PluginOperationWrapper *plugin_op_
306 306
307 p_op = (struct ESCROW_GnsPluginOperation *)plugin_op_wrap->plugin_op; 307 p_op = (struct ESCROW_GnsPluginOperation *)plugin_op_wrap->plugin_op;
308 308
309 // TODO: implement 309 anchorDataSize = strlen(p_op->userSecret) + 1;
310 anchorDataSize = 0; // TODO!
311 anchor = GNUNET_malloc (sizeof (struct GNUNET_ESCROW_Anchor) + anchorDataSize); 310 anchor = GNUNET_malloc (sizeof (struct GNUNET_ESCROW_Anchor) + anchorDataSize);
311 anchor->method = GNUNET_ESCROW_KEY_GNS;
312 anchor->size = anchorDataSize;
313 GNUNET_memcpy (&anchor[1], p_op->userSecret, anchorDataSize);
312 314
313 p_op->anchor_wrap->escrowAnchor = anchor; 315 p_op->anchor_wrap->escrowAnchor = anchor;
314 316
@@ -687,7 +689,6 @@ start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
687 p_op->share_threshold = (uint8_t)share_threshold; 689 p_op->share_threshold = (uint8_t)share_threshold;
688 690
689 /* create the escrow identities */ 691 /* create the escrow identities */
690 // TODO: check for existing escrow identities
691 create_escrow_identities (plugin_op_wrap, ego->name); 692 create_escrow_identities (plugin_op_wrap, ego->name);
692 693
693 /* operation continues in escrow_ids_finished 694 /* operation continues in escrow_ids_finished
@@ -851,8 +852,12 @@ char *
851gns_anchor_data_to_string (struct GNUNET_ESCROW_Handle *h, 852gns_anchor_data_to_string (struct GNUNET_ESCROW_Handle *h,
852 struct GNUNET_ESCROW_Anchor *escrowAnchor) 853 struct GNUNET_ESCROW_Anchor *escrowAnchor)
853{ 854{
854 // TODO: implement 855 char *anchorString;
855 return NULL; 856
857 anchorString = GNUNET_malloc (escrowAnchor->size);
858 GNUNET_memcpy (anchorString, &escrowAnchor[1], escrowAnchor->size);
859
860 return anchorString;
856} 861}
857 862
858 863