diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-13 09:49:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-13 09:49:47 +0100 |
commit | 968e4aa68f4185d24466bb3ba8bfaba8d9c27ef1 (patch) | |
tree | a29d92350a3b9a8c38986e55bb08b23c9d9d3aa3 /src/mint/taler-mint-httpd_db.c | |
parent | 2f70806cfaff445880639857fef45fd7bdd7f8a5 (diff) | |
download | exchange-968e4aa68f4185d24466bb3ba8bfaba8d9c27ef1.tar.gz exchange-968e4aa68f4185d24466bb3ba8bfaba8d9c27ef1.tar.bz2 exchange-968e4aa68f4185d24466bb3ba8bfaba8d9c27ef1.zip |
slightly better error generation on /refresh/reveal errors
Diffstat (limited to 'src/mint/taler-mint-httpd_db.c')
-rw-r--r-- | src/mint/taler-mint-httpd_db.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c index 4ae4408e5..63bca2ecc 100644 --- a/src/mint/taler-mint-httpd_db.c +++ b/src/mint/taler-mint-httpd_db.c @@ -732,8 +732,12 @@ check_commitment (struct MHD_Connection *connection, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "transfer keys do not match\n"); - return (MHD_YES == TALER_MINT_reply_external_error (connection, - "Transfer private key missmatch")) + /* FIXME: return more specific error with original signature (#3712) */ + return (MHD_YES == + TALER_MINT_reply_refresh_reveal_missmatch (connection, + off, + j, + "transfer key")) ? GNUNET_NO : GNUNET_SYSERR; } @@ -757,8 +761,9 @@ check_commitment (struct MHD_Connection *connection, &shared_secret)) { GNUNET_break (0); - return (MHD_YES == TALER_MINT_reply_internal_error (connection, - "Decryption error")) + return (MHD_YES == + TALER_MINT_reply_internal_error (connection, + "Decryption error")) ? GNUNET_NO : GNUNET_SYSERR; } @@ -773,8 +778,12 @@ check_commitment (struct MHD_Connection *connection, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "shared secrets do not match\n"); - return (MHD_YES == TALER_MINT_reply_external_error (connection, - "Shared secret missmatch")) + /* FIXME: return more specific error with original signature (#3712) */ + return (MHD_YES == + TALER_MINT_reply_refresh_reveal_missmatch (connection, + off, + j, + "transfer secret")) ? GNUNET_NO : GNUNET_SYSERR; } } @@ -843,9 +852,12 @@ check_commitment (struct MHD_Connection *connection, "blind envelope does not match for kappa=%u, old=%d\n", off, (int) j); - /* FIXME: return more specific error with exact offset */ - return (MHD_YES == TALER_MINT_reply_external_error (connection, - "Envelope missmatch")) + /* FIXME: return more specific error with original signature (#3712) */ + return (MHD_YES == + TALER_MINT_reply_refresh_reveal_missmatch (connection, + off, + j, + "envelope")) ? GNUNET_NO : GNUNET_SYSERR; } GNUNET_free (buf); |