aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_plaintext.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-08-05 13:15:25 +0200
committerjospaeth <spaethj@in.tum.de>2020-08-05 13:15:25 +0200
commite35aa4c6b22ae0ae81a23e973eda3655f29e29b5 (patch)
treee826aaf4e9ad0c1706778c6bbe6e56c0eb957dae /src/escrow/plugin_escrow_plaintext.c
parent7d0910b473aff309d0ee9852d44f611cf897dbda (diff)
downloadgnunet-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_plaintext.c')
-rw-r--r--src/escrow/plugin_escrow_plaintext.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c
index b6de718e4..7d0fb24fb 100644
--- a/src/escrow/plugin_escrow_plaintext.c
+++ b/src/escrow/plugin_escrow_plaintext.c
@@ -331,6 +331,32 @@ restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
331 331
332 332
333/** 333/**
334 * Get the status of a plaintext escrow
335 *
336 * @param h the handle for the escrow component
337 * @param ego the identity ego of which the status has to be obtained
338 * @param escrowAnchor the escrow anchor needed to restore the key
339 *
340 * @return the status of the escrow packed into a GNUNET_ESCROW_Status struct
341 */
342struct GNUNET_ESCROW_Status *
343plaintext_get_status (struct GNUNET_ESCROW_Handle *h,
344 const struct GNUNET_IDENTITY_Ego *ego,
345 struct GNUNET_ESCROW_Anchor *escrowAnchor)
346{
347 struct GNUNET_ESCROW_Status *status;
348
349 status = GNUNET_new (struct GNUNET_ESCROW_Status);
350 // TODO: get the correct time values
351 status->last_escrow_time = GNUNET_TIME_absolute_get ();
352 status->next_recommended_escrow_time = GNUNET_TIME_absolute_get ();
353 // END TODO
354
355 return status;
356}
357
358
359/**
334 * Deserialize an escrow anchor string into a GNUNET_ESCROW_Anchor struct 360 * Deserialize an escrow anchor string into a GNUNET_ESCROW_Anchor struct
335 * 361 *
336 * @param h the handle for the escrow component 362 * @param h the handle for the escrow component
@@ -434,6 +460,7 @@ libgnunet_plugin_escrow_plaintext_init (void *cls)
434 api->start_key_escrow = &start_plaintext_key_escrow; 460 api->start_key_escrow = &start_plaintext_key_escrow;
435 api->verify_key_escrow = &verify_plaintext_key_escrow; 461 api->verify_key_escrow = &verify_plaintext_key_escrow;
436 api->restore_key = &restore_plaintext_key_escrow; 462 api->restore_key = &restore_plaintext_key_escrow;
463 api->get_status = &plaintext_get_status;
437 api->anchor_string_to_data = &plaintext_anchor_string_to_data; 464 api->anchor_string_to_data = &plaintext_anchor_string_to_data;
438 api->anchor_data_to_string = &plaintext_anchor_data_to_string; 465 api->anchor_data_to_string = &plaintext_anchor_data_to_string;
439 api->cancel_plugin_operation = &cancel_plaintext_operation; 466 api->cancel_plugin_operation = &cancel_plaintext_operation;