aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-sign.c
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-18 13:44:07 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-18 13:48:15 +0200
commit02962b4f124f2e129bf33366359bbe111e72e2f9 (patch)
treeb47ffe2aa6d8cae3badc0de11df82ae094f411e3 /src/auditor/taler-auditor-sign.c
parent325d68eea8297962ed36e3a5f6899ab877df0908 (diff)
auditor doesn't sign a zero-length list of denominations
Diffstat (limited to 'src/auditor/taler-auditor-sign.c')
-rw-r--r--src/auditor/taler-auditor-sign.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/auditor/taler-auditor-sign.c b/src/auditor/taler-auditor-sign.c
index fd5169de0..d1a205b3d 100644
--- a/src/auditor/taler-auditor-sign.c
+++ b/src/auditor/taler-auditor-sign.c
@@ -271,6 +271,15 @@ main (int argc,
return 1;
}
dks_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS);
+ if (0 == dks_len)
+ {
+ fprintf (stderr,
+ "Denomination list has length zero, signature not produced.\n");
+ GNUNET_DISK_file_close (fh);
+ GNUNET_free (eddsa_priv);
+ return 2;
+
+ }
kv.purpose.purpose = htonl (TALER_SIGNATURE_AUDITOR_EXCHANGE_KEYS);
kv.purpose.size = htonl (sizeof (struct TALER_ExchangeKeyValidityPS));
GNUNET_CRYPTO_hash (auditor_url,