diff options
author | jospaeth <spaethj@in.tum.de> | 2020-08-10 19:27:42 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-08-10 19:27:42 +0200 |
commit | 2c21c75bd151d9265f5cca2fab721a16afff7e10 (patch) | |
tree | 57cb6fdc9195b8dbe79d725866f6b3b74a408ecb /src/escrow/plugin_escrow_plaintext.c | |
parent | f2fb911d529db3787b15e39b8a41e081ea626e41 (diff) | |
download | gnunet-2c21c75bd151d9265f5cca2fab721a16afff7e10.tar.gz gnunet-2c21c75bd151d9265f5cca2fab721a16afff7e10.zip |
some error messages
Diffstat (limited to 'src/escrow/plugin_escrow_plaintext.c')
-rw-r--r-- | src/escrow/plugin_escrow_plaintext.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c index 390ba901e..7c58ed908 100644 --- a/src/escrow/plugin_escrow_plaintext.c +++ b/src/escrow/plugin_escrow_plaintext.c | |||
@@ -172,6 +172,7 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
172 | if (NULL == ego) | 172 | if (NULL == ego) |
173 | { | 173 | { |
174 | w->escrowAnchor = NULL; | 174 | w->escrowAnchor = NULL; |
175 | w->emsg = _ ("ESCROW_put was called with ego == NULL!\n"); | ||
175 | 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); |
176 | return plugin_op_wrap; | 177 | return plugin_op_wrap; |
177 | } | 178 | } |
@@ -251,6 +252,7 @@ verify_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
251 | if (NULL == ego) | 252 | if (NULL == ego) |
252 | { | 253 | { |
253 | w->verificationResult = GNUNET_ESCROW_INVALID; | 254 | w->verificationResult = GNUNET_ESCROW_INVALID; |
255 | w->emsg = _ ("ESCROW_verify was called with ego == NULL!\n"); | ||
254 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); | 256 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); |
255 | return plugin_op_wrap; | 257 | return plugin_op_wrap; |
256 | } | 258 | } |
@@ -319,11 +321,14 @@ create_finished (void *cls, | |||
319 | if (NULL == pk) | 321 | if (NULL == pk) |
320 | { | 322 | { |
321 | if (NULL != emsg) | 323 | if (NULL != emsg) |
324 | { | ||
322 | fprintf (stderr, | 325 | fprintf (stderr, |
323 | "Identity create operation returned with error: %s\n", | 326 | "Identity create operation returned with error: %s\n", |
324 | emsg); | 327 | emsg); |
328 | p_op->ego_wrap->emsg = _ ("Identity create failed!\n"); | ||
329 | } | ||
325 | else | 330 | else |
326 | fprintf (stderr, "Failed to create ego!"); | 331 | p_op->ego_wrap->emsg = _ ("Failed to create ego!\n"); |
327 | p_op->ego_wrap->ego = NULL; | 332 | p_op->ego_wrap->ego = NULL; |
328 | p_op->cont (p_op->ego_wrap); | 333 | p_op->cont (p_op->ego_wrap); |
329 | return; | 334 | return; |
@@ -392,6 +397,7 @@ restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
392 | { | 397 | { |
393 | // TODO: correct error handling? | 398 | // TODO: correct error handling? |
394 | w->ego = NULL; | 399 | w->ego = NULL; |
400 | w->emsg = _ ("ESCROW_get was called with escrowAnchor == NULL!\n"); | ||
395 | // schedule handle_restore_error, which calls the callback and cleans up | 401 | // schedule handle_restore_error, which calls the callback and cleans up |
396 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&handle_restore_error, plugin_op_wrap); | 402 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&handle_restore_error, plugin_op_wrap); |
397 | return plugin_op_wrap; | 403 | return plugin_op_wrap; |
@@ -402,6 +408,7 @@ restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
402 | &pk)) | 408 | &pk)) |
403 | { | 409 | { |
404 | w->ego = NULL; | 410 | w->ego = NULL; |
411 | w->emsg = _ ("Failed to create ECDSA private key from escrow anchor!\n"); | ||
405 | // schedule handle_restore_error, which calls the callback and cleans up | 412 | // schedule handle_restore_error, which calls the callback and cleans up |
406 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&handle_restore_error, plugin_op_wrap); | 413 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&handle_restore_error, plugin_op_wrap); |
407 | return plugin_op_wrap; | 414 | return plugin_op_wrap; |