gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: add test for missin


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: add test for missing denomination signature checks
Date: Tue, 03 Sep 2019 04:44:53 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 3eb0a376 add test for missing denomination signature checks
3eb0a376 is described below

commit 3eb0a3766f73f01105e7ee894f03617b0ca9a0b0
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Sep 3 04:44:48 2019 +0200

    add test for missing denomination signature checks
---
 src/auditor/taler-auditor.c |  3 +++
 src/auditor/test-auditor.sh | 20 ++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index ca421cd8..3e0c7f73 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -3904,6 +3904,9 @@ deposit_cb (void *cls,
     cc->qs = qs;
     return GNUNET_SYSERR;
   }
+  // FIXME42: should verify that the
+  // coin was properly signed via TALER_test_coin_valid() here!
+  // (but may need more information from DB to do so!)
 
   /* Verify deposit signature */
   dr.purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_DEPOSIT);
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index b46301e8..f4d17628 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -394,6 +394,26 @@ echo "UPDATE deposits SET h_contract_terms='${OLD_H}' 
WHERE deposit_serial_id=1"
 }
 
 
+# Test where denom_sig in known_coins table is wrong
+# (=> bad signature)
+test_6() {
+echo "===========6: known_coins signature wrong================="
+# Modify denom_sig, so it is wrong
+OLD_SIG=`echo 'SELECT denom_sig FROM known_coins LIMIT 1;' | psql 
taler-auditor-test -Aqt`
+COIN_PUB=`echo "SELECT coin_pub FROM known_coins WHERE denom_sig='$OLD_SIG';"  
| psql taler-auditor-test -Aqt`
+echo "UPDATE known_coins SET 
denom_sig='\x287369672d76616c200a2028727361200a20202873202335423837314237433930364446433034424244304530393532464136424641324635373031393741313134373537463246323233323946444431463246433334453939394133363634303342334131333244444642394138333538334645363544423743354344453044414430353744383633364345414238344638433238433444463041443630303434304130383534353630393738334344313332393937364236424334373130413246324141324144354138333034324343463141394646353942444343463744
 [...]
+
+run_audit
+
+# FIXME: add logic to check bad signature was detected
+# (NOTE: FIXME42-bug: auditor does not yet check denom_sigs!)
+
+# Undo
+echo "UPDATE known_coins SET denom_sig='$OLD_SIG' WHERE coin_pub='$COIN_PUB'" 
| psql -Aqt $DB
+
+}
+
+
 
 
 # Test where h_wire in the deposit table is wrong

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



reply via email to

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