aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_gns.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-01 19:20:07 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-01 19:20:07 +0200
commitdb199dd2280071adafc14ff66cfa1c21399f06c2 (patch)
tree4304101abda07cab1635936a7c7549b483411e2c /src/escrow/plugin_escrow_gns.c
parentb3d2c4c9fe8837ad962ed33189b0807c7d634923 (diff)
downloadgnunet-db199dd2280071adafc14ff66cfa1c21399f06c2.tar.gz
gnunet-db199dd2280071adafc14ff66cfa1c21399f06c2.zip
change structure of struct GNUNET_ESCROW_Anchor
encode method name and ego name in anchor string implement anchor_string_to_data and anchor_data_to_string in escrow_api.c (not plugin-specific)
Diffstat (limited to 'src/escrow/plugin_escrow_gns.c')
-rw-r--r--src/escrow/plugin_escrow_gns.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c
index 121fdc4af..a3a3cc81b 100644
--- a/src/escrow/plugin_escrow_gns.c
+++ b/src/escrow/plugin_escrow_gns.c
@@ -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, 1323 struct GNUNET_ESCROW_Anchor *escrowAnchor, // TODO: use escrowAnchor??
1324 PkContinuation cont, 1324 PkContinuation cont,
1325 void *cont_cls) 1325 void *cont_cls)
1326{ 1326{
@@ -1657,40 +1657,6 @@ gns_get_status (struct GNUNET_ESCROW_Handle *h,
1657 1657
1658 1658
1659/** 1659/**
1660 * Deserialize an escrow anchor string into a GNUNET_ESCROW_Anchor struct
1661 *
1662 * @param anchorString the encoded escrow anchor string
1663 *
1664 * @return the deserialized data packed into a GNUNET_ESCROW_Anchor struct,
1665 * NULL if we failed to parse the string
1666 */
1667struct GNUNET_ESCROW_Anchor *
1668gns_anchor_string_to_data (struct GNUNET_ESCROW_Handle *h,
1669 char *anchorString)
1670{
1671 return ESCROW_anchor_string_to_data (anchorString,
1672 GNUNET_ESCROW_KEY_GNS);
1673}
1674
1675
1676/**
1677 * Serialize an escrow anchor struct into a string
1678 *
1679 * @param h the handle for the escrow component
1680 * @param escrowAnchor the escrow anchor struct
1681 *
1682 * @return the encoded escrow anchor string
1683 */
1684char *
1685gns_anchor_data_to_string (struct GNUNET_ESCROW_Handle *h,
1686 struct GNUNET_ESCROW_Anchor *escrowAnchor)
1687{
1688 return ESCROW_anchor_data_to_string (escrowAnchor,
1689 GNUNET_ESCROW_KEY_GNS);
1690}
1691
1692
1693/**
1694 * Cancel a GNS plugin operation. 1660 * Cancel a GNS plugin operation.
1695 * 1661 *
1696 * @param plugin_op_wrap the plugin operation wrapper containing the operation 1662 * @param plugin_op_wrap the plugin operation wrapper containing the operation
@@ -1742,8 +1708,6 @@ libgnunet_plugin_escrow_gns_init (void *cls)
1742 api->verify_key_escrow = &verify_gns_key_escrow; 1708 api->verify_key_escrow = &verify_gns_key_escrow;
1743 api->restore_key = &restore_gns_key_escrow; 1709 api->restore_key = &restore_gns_key_escrow;
1744 api->get_status = &gns_get_status; 1710 api->get_status = &gns_get_status;
1745 api->anchor_string_to_data = &gns_anchor_string_to_data;
1746 api->anchor_data_to_string = &gns_anchor_data_to_string;
1747 api->cancel_plugin_operation = &cancel_gns_operation; 1711 api->cancel_plugin_operation = &cancel_gns_operation;
1748 1712
1749 ph.state = ESCROW_PLUGIN_STATE_INIT; 1713 ph.state = ESCROW_PLUGIN_STATE_INIT;