diff options
author | jospaeth <spaethj@in.tum.de> | 2020-08-05 13:15:25 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-08-05 13:15:25 +0200 |
commit | e35aa4c6b22ae0ae81a23e973eda3655f29e29b5 (patch) | |
tree | e826aaf4e9ad0c1706778c6bbe6e56c0eb957dae /src/escrow/plugin_escrow_gns.c | |
parent | 7d0910b473aff309d0ee9852d44f611cf897dbda (diff) | |
download | gnunet-e35aa4c6b22ae0ae81a23e973eda3655f29e29b5.tar.gz gnunet-e35aa4c6b22ae0ae81a23e973eda3655f29e29b5.zip |
add a API method for getting the escrow status
not yet working!
Diffstat (limited to 'src/escrow/plugin_escrow_gns.c')
-rw-r--r-- | src/escrow/plugin_escrow_gns.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c index 45c16366b..618591393 100644 --- a/src/escrow/plugin_escrow_gns.c +++ b/src/escrow/plugin_escrow_gns.c | |||
@@ -224,6 +224,32 @@ restore_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
224 | 224 | ||
225 | 225 | ||
226 | /** | 226 | /** |
227 | * Get the status of a GNS escrow | ||
228 | * | ||
229 | * @param h the handle for the escrow component | ||
230 | * @param ego the identity ego of which the status has to be obtained | ||
231 | * @param escrowAnchor the escrow anchor needed to restore the key | ||
232 | * | ||
233 | * @return the status of the escrow packed into a GNUNET_ESCROW_Status struct | ||
234 | */ | ||
235 | struct GNUNET_ESCROW_Status * | ||
236 | gns_get_status (struct GNUNET_ESCROW_Handle *h, | ||
237 | const struct GNUNET_IDENTITY_Ego *ego, | ||
238 | struct GNUNET_ESCROW_Anchor *escrowAnchor) | ||
239 | { | ||
240 | struct GNUNET_ESCROW_Status *status; | ||
241 | |||
242 | status = GNUNET_new (struct GNUNET_ESCROW_Status); | ||
243 | // TODO: get the correct time values | ||
244 | status->last_escrow_time = GNUNET_TIME_absolute_get (); | ||
245 | status->next_recommended_escrow_time = GNUNET_TIME_absolute_get (); | ||
246 | // END TODO | ||
247 | |||
248 | return status; | ||
249 | } | ||
250 | |||
251 | |||
252 | /** | ||
227 | * Deserialize an escrow anchor string into a GNUNET_ESCROW_Anchor struct | 253 | * Deserialize an escrow anchor string into a GNUNET_ESCROW_Anchor struct |
228 | * | 254 | * |
229 | * @param anchorString the encoded escrow anchor string | 255 | * @param anchorString the encoded escrow anchor string |
@@ -305,6 +331,7 @@ libgnunet_plugin_escrow_gns_init (void *cls) | |||
305 | api->start_key_escrow = &start_gns_key_escrow; | 331 | api->start_key_escrow = &start_gns_key_escrow; |
306 | api->verify_key_escrow = &verify_gns_key_escrow; | 332 | api->verify_key_escrow = &verify_gns_key_escrow; |
307 | api->restore_key = &restore_gns_key_escrow; | 333 | api->restore_key = &restore_gns_key_escrow; |
334 | api->get_status = &gns_get_status; | ||
308 | api->anchor_string_to_data = &gns_anchor_string_to_data; | 335 | api->anchor_string_to_data = &gns_anchor_string_to_data; |
309 | api->cancel_plugin_operation = &cancel_gns_operation; | 336 | api->cancel_plugin_operation = &cancel_gns_operation; |
310 | 337 | ||