From 011b7f5bcd3e3edcc5ae321df1f205fde7d202e5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Mar 2017 18:27:53 +0100 Subject: add skeleton function for 3887-emergency reporting --- src/auditor/taler-auditor.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/auditor/taler-auditor.c') 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; } -- cgit v1.2.3