diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-27 21:59:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-27 21:59:04 +0200 |
commit | 382fb837bd43ec7de93c8e17404732b4c95ccaca (patch) | |
tree | 1737647cf5dc6872886919adfcb1034108225832 /src/util/denom.c | |
parent | b449c7353ef5d789500244c790bae5affedf0ee7 (diff) | |
download | exchange-382fb837bd43ec7de93c8e17404732b4c95ccaca.tar.xz |
-work on testing FTBFS
Diffstat (limited to 'src/util/denom.c')
-rw-r--r-- | src/util/denom.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util/denom.c b/src/util/denom.c index 407ade384..a7f5f5641 100644 --- a/src/util/denom.c +++ b/src/util/denom.c @@ -242,4 +242,23 @@ TALER_denom_pub_cmp (const struct TALER_DenominationPublicKey *denom1, } +int +TALER_denom_sig_cmp (const struct TALER_DenominationSignature *sig1, + const struct TALER_DenominationSignature *sig2) +{ + if (sig1->cipher != sig2->cipher) + return (sig1->cipher > sig2->cipher) ? 1 : -1; + switch (sig1->cipher) + { + case TALER_SIGINATION_RSA: + return GNUNET_CRYPTO_rsa_signature_cmp (sig1->details.rsa_signature, + sig2->details.rsa_signature); + // TODO: add case for Clause-Schnorr + default: + GNUNET_assert (0); + } + return -2; +} + + /* end of denom.c */ |