aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_plaintext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/escrow/plugin_escrow_plaintext.c')
-rw-r--r--src/escrow/plugin_escrow_plaintext.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c
index b26653667..f629ac452 100644
--- a/src/escrow/plugin_escrow_plaintext.c
+++ b/src/escrow/plugin_escrow_plaintext.c
@@ -171,7 +171,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
171 171
172 if (NULL == ego) 172 if (NULL == ego)
173 { 173 {
174 w->escrowAnchor = NULL; 174 w->anchor = NULL;
175 w->emsg = _ ("ESCROW_put was called with ego == NULL!\n"); 175 w->emsg = _ ("ESCROW_put was called with ego == NULL!\n");
176 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap); 176 p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap);
177 return plugin_op_wrap; 177 return plugin_op_wrap;
@@ -186,7 +186,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
186 anchor->size = anchorDataSize; 186 anchor->size = anchorDataSize;
187 GNUNET_memcpy (&anchor[1], pkString, anchorDataSize); 187 GNUNET_memcpy (&anchor[1], pkString, anchorDataSize);
188 188
189 w->escrowAnchor = anchor; 189 w->anchor = anchor;
190 190
191 /* set the last escrow time */ 191 /* set the last escrow time */
192 ESCROW_update_escrow_status (h, ego, "plaintext"); 192 ESCROW_update_escrow_status (h, ego, "plaintext");
@@ -214,7 +214,7 @@ verify_cont (void *cls)
214 * 214 *
215 * @param h the handle for the escrow component 215 * @param h the handle for the escrow component
216 * @param ego the identity ego containing the private key 216 * @param ego the identity ego containing the private key
217 * @param escrowAnchor the escrow anchor needed to restore the key 217 * @param anchor the escrow anchor needed to restore the key
218 * @param cb the function called upon completion 218 * @param cb the function called upon completion
219 * @param op_id unique ID of the respective ESCROW_Operation 219 * @param op_id unique ID of the respective ESCROW_Operation
220 * 220 *
@@ -223,7 +223,7 @@ verify_cont (void *cls)
223struct ESCROW_PluginOperationWrapper * 223struct ESCROW_PluginOperationWrapper *
224verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, 224verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
225 struct GNUNET_IDENTITY_Ego *ego, 225 struct GNUNET_IDENTITY_Ego *ego,
226 struct GNUNET_ESCROW_Anchor *escrowAnchor, 226 struct GNUNET_ESCROW_Anchor *anchor,
227 ESCROW_Plugin_Continuation cb, 227 ESCROW_Plugin_Continuation cb,
228 uint32_t op_id) 228 uint32_t op_id)
229{ 229{
@@ -257,7 +257,7 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
257 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); 257 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
258 return plugin_op_wrap; 258 return plugin_op_wrap;
259 } 259 }
260 if (0 != strcmp (ego->name, escrowAnchor->egoName)) 260 if (0 != strcmp (ego->name, anchor->egoName))
261 { 261 {
262 w->verificationResult = GNUNET_ESCROW_INVALID; 262 w->verificationResult = GNUNET_ESCROW_INVALID;
263 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n"); 263 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n");
@@ -267,8 +267,8 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h,
267 pk = GNUNET_IDENTITY_ego_get_private_key (ego); 267 pk = GNUNET_IDENTITY_ego_get_private_key (ego);
268 pkString = GNUNET_CRYPTO_ecdsa_private_key_to_string (pk); 268 pkString = GNUNET_CRYPTO_ecdsa_private_key_to_string (pk);
269 verificationResult = strncmp (pkString, 269 verificationResult = strncmp (pkString,
270 (char *)&escrowAnchor[1], 270 (char *)&anchor[1],
271 escrowAnchor->size) == 0 ? 271 anchor->size) == 0 ?
272 GNUNET_ESCROW_VALID : GNUNET_ESCROW_INVALID; 272 GNUNET_ESCROW_VALID : GNUNET_ESCROW_INVALID;
273 273
274 w->verificationResult = verificationResult; 274 w->verificationResult = verificationResult;