diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:27:53 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:27:53 +0100 |
commit | 011b7f5bcd3e3edcc5ae321df1f205fde7d202e5 (patch) | |
tree | deab1ab4b0fb6c848e37421821e6c3b3785ead23 | |
parent | 382e3dfedbf3384065fc19b3ea561aed754b402f (diff) |
add skeleton function for 3887-emergency reporting
-rw-r--r-- | src/auditor/taler-auditor.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c index d04eabce3..34f860ee1 100644 --- a/src/auditor/taler-auditor.c +++ b/src/auditor/taler-auditor.c @@ -98,6 +98,28 @@ static struct TALER_AUDITORDB_ProgressPoint pp; /* ***************************** Report logic **************************** */ + +/** + * Called in case we detect an emergency situation where the exchange + * is paying out a larger amount on a denomination than we issued in + * that denomination. This means that the exchange's private keys + * might have gotten compromised, and that we need to trigger an + * emergency request to all wallets to deposit pending coins for the + * denomination (and as an exchange suffer a huge financial loss). + * + * @param dki denomination key where the loss was detected + */ +static void +report_emergency (const struct TALER_EXCHANGEDB_DenominationKeyInformationP *dki) +{ + /* TODO: properly implement #3887, including how to continue the + audit after the emergency. */ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Emergency detected for denomination %s\n", + GNUNET_h2s (&dki->properties.denom_hash)); +} + + /** * Report a (serious) inconsistency in the exchange's database. * @@ -1660,8 +1682,7 @@ refresh_session_cb (void *cls, &dso->denom_balance, amount_with_fee)) { - // FIXME: trigger EMERGENCY PROTOCOL HERE! Exchange has been compromised! - GNUNET_break (0); + report_emergency (dki); return GNUNET_SYSERR; } @@ -1776,8 +1797,7 @@ deposit_cb (void *cls, &ds->denom_balance, amount_with_fee)) { - // FIXME: trigger EMERGENCY PROTOCOL HERE! Exchange has been compromised! - GNUNET_break (0); + report_emergency (dki); return GNUNET_SYSERR; } |