aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_gns.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-08-06 14:33:34 +0200
committerjospaeth <spaethj@in.tum.de>2020-08-06 14:33:34 +0200
commit7359d93752bfe39d1154ea0e67f556dab0020cff (patch)
tree207713d099a540a9b247320089f52fb82cc6f8e3 /src/escrow/plugin_escrow_gns.c
parentf7272dfc42de5b4cd0f9b27308e82e91d5f64ee3 (diff)
downloadgnunet-7359d93752bfe39d1154ea0e67f556dab0020cff.tar.gz
gnunet-7359d93752bfe39d1154ea0e67f556dab0020cff.zip
add unique operation ID for distinction in the cb
Diffstat (limited to 'src/escrow/plugin_escrow_gns.c')
-rw-r--r--src/escrow/plugin_escrow_gns.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c
index 618591393..e55019ad9 100644
--- a/src/escrow/plugin_escrow_gns.c
+++ b/src/escrow/plugin_escrow_gns.c
@@ -63,13 +63,15 @@ struct ESCROW_PluginHandle ph;
63 * @param h the handle for the escrow component 63 * @param h the handle for the escrow component
64 * @param ego the identity ego containing the private key 64 * @param ego the identity ego containing the private key
65 * @param cb the function called upon completion 65 * @param cb the function called upon completion
66 * @param op_id unique ID of the respective ESCROW_Operation
66 * 67 *
67 * @return plugin operation wrapper 68 * @return plugin operation wrapper
68 */ 69 */
69struct ESCROW_PluginOperationWrapper * 70struct ESCROW_PluginOperationWrapper *
70start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, 71start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
71 const struct GNUNET_IDENTITY_Ego *ego, 72 const struct GNUNET_IDENTITY_Ego *ego,
72 GNUNET_SCHEDULER_TaskCallback cb) 73 GNUNET_SCHEDULER_TaskCallback cb,
74 uint32_t op_id)
73{ 75{
74 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk; 76 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk;
75 sss_Keyshare keyshares; 77 sss_Keyshare keyshares;
@@ -92,6 +94,7 @@ start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
92 94
93 w = GNUNET_new (struct ESCROW_Plugin_AnchorContinuationWrapper); 95 w = GNUNET_new (struct ESCROW_Plugin_AnchorContinuationWrapper);
94 w->h = h; 96 w->h = h;
97 w->op_id = op_id;
95 98
96 if (NULL == ego) 99 if (NULL == ego)
97 { 100 {
@@ -150,6 +153,7 @@ start_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
150 * @param ego the identity ego containing the private key 153 * @param ego the identity ego containing the private key
151 * @param escrowAnchor the escrow anchor needed to restore the key 154 * @param escrowAnchor the escrow anchor needed to restore the key
152 * @param cb the function called upon completion 155 * @param cb the function called upon completion
156 * @param op_id unique ID of the respective ESCROW_Operation
153 * 157 *
154 * @return plugin operation wrapper 158 * @return plugin operation wrapper
155 */ 159 */
@@ -157,7 +161,8 @@ struct ESCROW_PluginOperationWrapper *
157verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, 161verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
158 const struct GNUNET_IDENTITY_Ego *ego, 162 const struct GNUNET_IDENTITY_Ego *ego,
159 struct GNUNET_ESCROW_Anchor *escrowAnchor, 163 struct GNUNET_ESCROW_Anchor *escrowAnchor,
160 GNUNET_SCHEDULER_TaskCallback cb) 164 GNUNET_SCHEDULER_TaskCallback cb,
165 uint32_t op_id)
161{ 166{
162 struct ESCROW_PluginOperationWrapper *plugin_op_wrap; 167 struct ESCROW_PluginOperationWrapper *plugin_op_wrap;
163 struct ESCROW_GnsPluginOperation *p_op; 168 struct ESCROW_GnsPluginOperation *p_op;
@@ -175,6 +180,7 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
175 180
176 w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper); 181 w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper);
177 w->h = h; 182 w->h = h;
183 w->op_id = op_id;
178 184
179 // TODO: implement 185 // TODO: implement
180 w->verificationResult = GNUNET_ESCROW_INVALID; 186 w->verificationResult = GNUNET_ESCROW_INVALID;
@@ -190,6 +196,7 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
190 * @param escrowAnchor the escrow anchor needed to restore the key 196 * @param escrowAnchor the escrow anchor needed to restore the key
191 * @param egoName the name of the ego to restore 197 * @param egoName the name of the ego to restore
192 * @param cb the function called upon completion 198 * @param cb the function called upon completion
199 * @param op_id unique ID of the respective ESCROW_Operation
193 * 200 *
194 * @return plugin operation wrapper 201 * @return plugin operation wrapper
195 */ 202 */
@@ -197,7 +204,8 @@ struct ESCROW_PluginOperationWrapper *
197restore_gns_key_escrow (struct GNUNET_ESCROW_Handle *h, 204restore_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
198 struct GNUNET_ESCROW_Anchor *escrowAnchor, 205 struct GNUNET_ESCROW_Anchor *escrowAnchor,
199 char *egoName, 206 char *egoName,
200 GNUNET_SCHEDULER_TaskCallback cb) 207 GNUNET_SCHEDULER_TaskCallback cb,
208 uint32_t op_id)
201{ 209{
202 struct ESCROW_PluginOperationWrapper *plugin_op_wrap; 210 struct ESCROW_PluginOperationWrapper *plugin_op_wrap;
203 struct ESCROW_GnsPluginOperation *p_op; 211 struct ESCROW_GnsPluginOperation *p_op;
@@ -215,6 +223,7 @@ restore_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
215 223
216 w = GNUNET_new (struct ESCROW_Plugin_EgoContinuationWrapper); 224 w = GNUNET_new (struct ESCROW_Plugin_EgoContinuationWrapper);
217 w->h = h; 225 w->h = h;
226 w->op_id = op_id;
218 227
219 // TODO: implement 228 // TODO: implement
220 w->ego = NULL; 229 w->ego = NULL;