aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/escrow_api.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-07-10 13:45:09 +0200
committerjospaeth <spaethj@in.tum.de>2020-07-10 13:45:09 +0200
commit45016bc5f75a0182db4596df54bf68fe83ecd12a (patch)
tree42040ebd05ec6552f18c1c3d2ace82dc4f319a4a /src/escrow/escrow_api.c
parent8e22ed9734ca214dae90a0a2f9bf0f2e1f5499bb (diff)
downloadgnunet-45016bc5f75a0182db4596df54bf68fe83ecd12a.tar.gz
gnunet-45016bc5f75a0182db4596df54bf68fe83ecd12a.zip
add escrow API methods, change plugin functions
Diffstat (limited to 'src/escrow/escrow_api.c')
-rw-r--r--src/escrow/escrow_api.c76
1 files changed, 74 insertions, 2 deletions
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c
index ba3a3ed3b..5a5891a71 100644
--- a/src/escrow/escrow_api.c
+++ b/src/escrow/escrow_api.c
@@ -25,7 +25,79 @@
25 * @brief api to interact with the escrow component 25 * @brief api to interact with the escrow component
26 */ 26 */
27 27
28#include "gnunet_escrow_lib.h"
28 29
29 30
30// GNUNET_ESCROW_put(Ego, ...) 31/**
31// GNUNET_ESCROW_get(anchor, Ego, ...) 32 * Put some data in escrow using the specified escrow method
33 *
34 * @param ego the identity ego to put in escrow
35 * @param method the escrow method to use
36 *
37 * @return the escrow anchor needed to get the data back
38 */
39void *
40GNUNET_ESCROW_put (const struct GNUNET_IDENTITY_Ego *ego,
41 enum GNUNET_ESCROW_Key_Escrow_Method method)
42{
43 switch (method)
44 {
45 case GNUNET_ESCROW_KEY_PLAINTEXT:
46 break;
47 case GNUNET_ESCROW_KEY_GNS:
48 break;
49 case GNUNET_ESCROW_KEY_ANASTASIS:
50 break;
51 }
52 return NULL;
53}
54
55
56/**
57 * Renew the escrow of the data related to the given escrow anchor
58 *
59 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method
60 * @param method the escrow method to use
61 *
62 * @return the escrow anchor needed to get the data back
63 */
64void *
65GNUNET_ESCROW_renew (void *escrowAnchor,
66 enum GNUNET_ESCROW_Key_Escrow_Method method)
67{
68 return NULL;
69}
70
71
72/**
73 * Get the escrowed data back
74 *
75 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method
76 * @param method the escrow method to use
77 *
78 * @return a new identity ego restored from the escrow
79 */
80const struct GNUNET_IDENTITY_Ego *
81GNUNET_ESCROW_get (void *escrowAnchor,
82 enum GNUNET_ESCROW_Key_Escrow_Method method)
83{
84 return NULL;
85}
86
87
88/**
89 * Verify the escrowed data
90 *
91 * @param ego the identity ego that was put into escrow
92 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method
93 * @param method the escrow method to use
94 *
95 * @return GNUNET_OK if the escrow could successfully by restored
96 */
97int
98GNUNET_ESCROW_verify (const struct GNUNET_IDENTITY_Ego *ego,
99 void *escrowAnchor,
100 enum GNUNET_ESCROW_Key_Escrow_Method method)
101{
102 return GNUNET_NO;
103}