gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] 01/02: add skeleton function for 3887-emer


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 01/02: add skeleton function for 3887-emergency reporting
Date: Fri, 17 Mar 2017 18:27:59 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit 011b7f5bcd3e3edcc5ae321df1f205fde7d202e5
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 17 18:27:53 2017 +0100

    add skeleton function for 3887-emergency reporting
---
 src/auditor/taler-auditor.c | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index d04eabc..34f860e 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;
   }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]