diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-04-08 22:52:32 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-04-08 22:52:32 +0200 |
commit | 11b8710a5caac9c81cb0eb6094b363fa46a74809 (patch) | |
tree | a83464349867a655c157e4aab5a4ed9e0bdc3471 /src/exchangedb | |
parent | 8e9d6c6fd1dce2dc04258e91673baa083b291600 (diff) | |
download | exchange-11b8710a5caac9c81cb0eb6094b363fa46a74809.tar.xz |
implement checking of denomination revocation status in auditor
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchangedb_denomkeys.c | 7 | ||||
-rw-r--r-- | src/exchangedb/test_exchangedb_denomkeys.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c index bfc3ab8eb..017960277 100644 --- a/src/exchangedb/exchangedb_denomkeys.c +++ b/src/exchangedb/exchangedb_denomkeys.c @@ -257,7 +257,7 @@ denomkeys_iterate_keydir_iter (void *cls, char *rev; struct TALER_MasterSignatureP msig; struct TALER_MasterDenominationKeyRevocation rm; - int revoked; + const struct TALER_MasterSignatureP *revoked; if ( (strlen(filename) > strlen (".rev")) && (0 == strcmp (&filename[strlen(filename) - strlen (".rev")], @@ -278,7 +278,7 @@ denomkeys_iterate_keydir_iter (void *cls, GNUNET_asprintf (&rev, "%s.rev", filename); - revoked = GNUNET_NO; + revoked = NULL; if (GNUNET_YES == GNUNET_DISK_file_test (rev)) { /* Check if revocation is valid... */ @@ -311,10 +311,9 @@ denomkeys_iterate_keydir_iter (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Denomination key `%s' was revoked!\n", filename); - revoked = GNUNET_YES; + revoked = &msig; } } - } GNUNET_free (rev); ret = dic->it (dic->it_cls, diff --git a/src/exchangedb/test_exchangedb_denomkeys.c b/src/exchangedb/test_exchangedb_denomkeys.c index e7803c2ef..fb728115a 100644 --- a/src/exchangedb/test_exchangedb_denomkeys.c +++ b/src/exchangedb/test_exchangedb_denomkeys.c @@ -38,7 +38,7 @@ * @param cls closure with expected DKI * @param dki the denomination key * @param alias coin alias - * @param was_revoked #GNUNET_YES if revoked + * @param revocation_master_sig non-NULL if @a dki was revoked * @return #GNUNET_OK to continue to iterate, * #GNUNET_NO to stop iteration with no error, * #GNUNET_SYSERR to abort iteration with error! @@ -47,7 +47,7 @@ static int dki_iter (void *cls, const char *alias, const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki, - int was_revoked) + const struct TALER_MasterSignatureP *revocation_master_sig) { const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *exp = cls; |