diff options
author | jospaeth <spaethj@in.tum.de> | 2020-08-06 14:33:34 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-08-06 14:33:34 +0200 |
commit | 7359d93752bfe39d1154ea0e67f556dab0020cff (patch) | |
tree | 207713d099a540a9b247320089f52fb82cc6f8e3 /src/escrow/plugin_escrow_plaintext.c | |
parent | f7272dfc42de5b4cd0f9b27308e82e91d5f64ee3 (diff) | |
download | gnunet-7359d93752bfe39d1154ea0e67f556dab0020cff.tar.gz gnunet-7359d93752bfe39d1154ea0e67f556dab0020cff.zip |
add unique operation ID for distinction in the cb
Diffstat (limited to 'src/escrow/plugin_escrow_plaintext.c')
-rw-r--r-- | src/escrow/plugin_escrow_plaintext.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c index 72579b829..83b2345c6 100644 --- a/src/escrow/plugin_escrow_plaintext.c +++ b/src/escrow/plugin_escrow_plaintext.c | |||
@@ -133,13 +133,15 @@ start_cont (void *cls) | |||
133 | * @param h the handle for the escrow component | 133 | * @param h the handle for the escrow component |
134 | * @param ego the identity ego containing the private key | 134 | * @param ego the identity ego containing the private key |
135 | * @param cb the function called upon completion | 135 | * @param cb the function called upon completion |
136 | * @param op_id unique ID of the respective ESCROW_Operation | ||
136 | * | 137 | * |
137 | * @return plugin operation wrapper | 138 | * @return plugin operation wrapper |
138 | */ | 139 | */ |
139 | struct ESCROW_PluginOperationWrapper * | 140 | struct ESCROW_PluginOperationWrapper * |
140 | start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | 141 | start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, |
141 | const struct GNUNET_IDENTITY_Ego *ego, | 142 | const struct GNUNET_IDENTITY_Ego *ego, |
142 | ESCROW_Plugin_Continuation cb) | 143 | ESCROW_Plugin_Continuation cb, |
144 | uint32_t op_id) | ||
143 | { | 145 | { |
144 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk; | 146 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk; |
145 | struct GNUNET_ESCROW_Anchor *anchor; | 147 | struct GNUNET_ESCROW_Anchor *anchor; |
@@ -162,6 +164,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
162 | 164 | ||
163 | w = GNUNET_new (struct ESCROW_Plugin_AnchorContinuationWrapper); | 165 | w = GNUNET_new (struct ESCROW_Plugin_AnchorContinuationWrapper); |
164 | w->h = h; | 166 | w->h = h; |
167 | w->op_id = op_id; | ||
165 | p_op->anchor_wrap = w; | 168 | p_op->anchor_wrap = w; |
166 | 169 | ||
167 | if (NULL == ego) | 170 | if (NULL == ego) |
@@ -206,6 +209,7 @@ verify_cont (void *cls) | |||
206 | * @param ego the identity ego containing the private key | 209 | * @param ego the identity ego containing the private key |
207 | * @param escrowAnchor the escrow anchor needed to restore the key | 210 | * @param escrowAnchor the escrow anchor needed to restore the key |
208 | * @param cb the function called upon completion | 211 | * @param cb the function called upon completion |
212 | * @param op_id unique ID of the respective ESCROW_Operation | ||
209 | * | 213 | * |
210 | * @return plugin operation wrapper | 214 | * @return plugin operation wrapper |
211 | */ | 215 | */ |
@@ -213,7 +217,8 @@ struct ESCROW_PluginOperationWrapper * | |||
213 | verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | 217 | verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, |
214 | const struct GNUNET_IDENTITY_Ego *ego, | 218 | const struct GNUNET_IDENTITY_Ego *ego, |
215 | struct GNUNET_ESCROW_Anchor *escrowAnchor, | 219 | struct GNUNET_ESCROW_Anchor *escrowAnchor, |
216 | ESCROW_Plugin_Continuation cb) | 220 | ESCROW_Plugin_Continuation cb, |
221 | uint32_t op_id) | ||
217 | { | 222 | { |
218 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk; | 223 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk; |
219 | char *pkString; | 224 | char *pkString; |
@@ -235,6 +240,7 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
235 | 240 | ||
236 | w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper); | 241 | w = GNUNET_new (struct ESCROW_Plugin_VerifyContinuationWrapper); |
237 | w->h = h; | 242 | w->h = h; |
243 | w->op_id = op_id; | ||
238 | p_op->verify_wrap = w; | 244 | p_op->verify_wrap = w; |
239 | 245 | ||
240 | if (NULL == ego) | 246 | if (NULL == ego) |
@@ -344,6 +350,7 @@ handle_restore_error (void *cls) | |||
344 | * @param escrowAnchor the escrow anchor needed to restore the key | 350 | * @param escrowAnchor the escrow anchor needed to restore the key |
345 | * @param egoName the name of the ego to restore | 351 | * @param egoName the name of the ego to restore |
346 | * @param cb the function called upon completion | 352 | * @param cb the function called upon completion |
353 | * @param op_id unique ID of the respective ESCROW_Operation | ||
347 | * | 354 | * |
348 | * @return plugin operation wrapper | 355 | * @return plugin operation wrapper |
349 | */ | 356 | */ |
@@ -351,7 +358,8 @@ struct ESCROW_PluginOperationWrapper * | |||
351 | restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | 358 | restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, |
352 | struct GNUNET_ESCROW_Anchor *escrowAnchor, | 359 | struct GNUNET_ESCROW_Anchor *escrowAnchor, |
353 | char *egoName, | 360 | char *egoName, |
354 | ESCROW_Plugin_Continuation cb) | 361 | ESCROW_Plugin_Continuation cb, |
362 | uint32_t op_id) | ||
355 | { | 363 | { |
356 | struct GNUNET_CRYPTO_EcdsaPrivateKey pk; | 364 | struct GNUNET_CRYPTO_EcdsaPrivateKey pk; |
357 | struct GNUNET_IDENTITY_Operation *id_op; | 365 | struct GNUNET_IDENTITY_Operation *id_op; |
@@ -373,6 +381,7 @@ restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
373 | 381 | ||
374 | w = GNUNET_new (struct ESCROW_Plugin_EgoContinuationWrapper); | 382 | w = GNUNET_new (struct ESCROW_Plugin_EgoContinuationWrapper); |
375 | w->h = h; | 383 | w->h = h; |
384 | w->op_id = op_id; | ||
376 | p_op->ego_wrap = w; | 385 | p_op->ego_wrap = w; |
377 | 386 | ||
378 | if (NULL == escrowAnchor) | 387 | if (NULL == escrowAnchor) |