-speed up invariant checks by using new GNUnet API

This commit is contained in:
Christian Grothoff 2021-11-25 14:53:52 +01:00
parent 94012d011c
commit dc4827ea20
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -475,22 +475,14 @@ check_dk (void *cls,
void *value)
{
struct TEH_DenominationKey *dk = value;
struct TALER_PlanchetSecretsP ps;
struct TALER_PlanchetDetail pd;
struct TALER_CoinPubHash c_hash;
(void) hc;
(void) value;
GNUNET_assert (TALER_DENOMINATION_INVALID != dk->denom_pub.cipher);
memset (&ps,
42,
sizeof (ps));
GNUNET_assert (GNUNET_OK ==
TALER_planchet_prepare (&dk->denom_pub,
&ps,
&c_hash,
&pd));
GNUNET_free (pd.coin_ev);
if (TALER_DENOMINATION_RSA == dk->denom_pub.cipher)
GNUNET_assert (GNUNET_CRYPTO_rsa_public_key_check (
dk->denom_pub.details.rsa_public_key));
return GNUNET_OK;
}