aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-11 21:06:30 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-11 21:06:30 +0200
commit44272bf1cee4312d8d9c83eedc34dbb63fa1c0a4 (patch)
treeaab79cc966bad591aadc7f4b469d816a9e261229 /src/exchangedb
parent88bb7f44281a9f8a9474a242f0e2557fed9da781 (diff)
adapations to GNUnet API change
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/test_exchangedb_denomkeys.c7
-rw-r--r--src/exchangedb/test_exchangedb_fees.c11
2 files changed, 7 insertions, 11 deletions
diff --git a/src/exchangedb/test_exchangedb_denomkeys.c b/src/exchangedb/test_exchangedb_denomkeys.c
index 12add14da..1acb61dde 100644
--- a/src/exchangedb/test_exchangedb_denomkeys.c
+++ b/src/exchangedb/test_exchangedb_denomkeys.c
@@ -114,7 +114,6 @@ main (int argc,
void *enc;
size_t enc_size;
struct TALER_EXCHANGEDB_DenominationKey dki_read;
- struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
struct TALER_MasterPrivateKeyP master_priv;
struct TALER_MasterPublicKeyP master_pub;
void *enc_read;
@@ -136,11 +135,9 @@ main (int argc,
tmpfile = NULL;
dki.denom_priv.rsa_private_key = NULL;
dki_read.denom_priv.rsa_private_key = NULL;
- pk = GNUNET_CRYPTO_eddsa_key_create ();
- master_priv.eddsa_priv = *pk;
- GNUNET_CRYPTO_eddsa_key_get_public (pk,
+ GNUNET_CRYPTO_eddsa_key_create (&master_priv.eddsa_priv);
+ GNUNET_CRYPTO_eddsa_key_get_public (&master_priv.eddsa_priv,
&master_pub.eddsa_pub);
- GNUNET_free (pk);
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
&dki.issue,
sizeof (struct
diff --git a/src/exchangedb/test_exchangedb_fees.c b/src/exchangedb/test_exchangedb_fees.c
index 55f34bd6f..f86dfe5c5 100644
--- a/src/exchangedb/test_exchangedb_fees.c
+++ b/src/exchangedb/test_exchangedb_fees.c
@@ -53,7 +53,7 @@ main (int argc,
struct TALER_EXCHANGEDB_AggregateFees *af;
struct TALER_EXCHANGEDB_AggregateFees *n;
struct TALER_MasterPublicKeyP master_pub;
- struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
+ struct GNUNET_CRYPTO_EddsaPrivateKey priv;
char *tmpdir;
char *tmpfile = NULL;
int ret;
@@ -67,8 +67,8 @@ main (int argc,
tmpdir = GNUNET_DISK_mkdtemp ("test_exchangedb_fees");
if (NULL == tmpdir)
return 77; /* skip test */
- priv = GNUNET_CRYPTO_eddsa_key_create ();
- GNUNET_CRYPTO_eddsa_key_get_public (priv,
+ GNUNET_CRYPTO_eddsa_key_create (&priv);
+ GNUNET_CRYPTO_eddsa_key_get_public (&priv,
&master_pub.eddsa_pub);
cfg = GNUNET_CONFIGURATION_create ();
GNUNET_CONFIGURATION_set_value_string (cfg,
@@ -91,7 +91,7 @@ main (int argc,
TALER_string_to_amount ("EUR:1.0",
&af->closing_fee));
sign_af (af,
- priv);
+ &priv);
n = GNUNET_new (struct TALER_EXCHANGEDB_AggregateFees);
n->start_date = GNUNET_TIME_year_to_time (year + 1);
n->end_date = GNUNET_TIME_year_to_time (year + 2);
@@ -102,7 +102,7 @@ main (int argc,
TALER_string_to_amount ("EUR:0.1",
&n->closing_fee));
sign_af (n,
- priv);
+ &priv);
af->next = n;
if (GNUNET_OK !=
@@ -148,7 +148,6 @@ main (int argc,
(void) GNUNET_DISK_directory_remove (tmpdir);
GNUNET_free (tmpdir);
- GNUNET_free (priv);
GNUNET_CONFIGURATION_destroy (cfg);
return ret;
}