aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_store_update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/test_namestore_api_store_update.c')
-rw-r--r--src/namestore/test_namestore_api_store_update.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c
index b0244453a..65dbdbd8c 100644
--- a/src/namestore/test_namestore_api_store_update.c
+++ b/src/namestore/test_namestore_api_store_update.c
@@ -48,7 +48,7 @@ static struct GNUNET_NAMECACHE_Handle *nch;
48 48
49static struct GNUNET_SCHEDULER_Task *endbadly_task; 49static struct GNUNET_SCHEDULER_Task *endbadly_task;
50 50
51static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; 51static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey;
52 52
53static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; 53static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
54 54
@@ -106,11 +106,6 @@ end (void *cls)
106 GNUNET_NAMECACHE_disconnect (nch); 106 GNUNET_NAMECACHE_disconnect (nch);
107 nch = NULL; 107 nch = NULL;
108 } 108 }
109 if (NULL != privkey)
110 {
111 GNUNET_free (privkey);
112 privkey = NULL;
113 }
114} 109}
115 110
116 111
@@ -157,7 +152,7 @@ rd_decrypt_cb (void *cls,
157 TEST_RECORD_DATALEN2); 152 TEST_RECORD_DATALEN2);
158 153
159 nsqe = GNUNET_NAMESTORE_records_store (nsh, 154 nsqe = GNUNET_NAMESTORE_records_store (nsh,
160 privkey, 155 &privkey,
161 name, 156 name,
162 1, 157 1,
163 &rd_new, 158 &rd_new,
@@ -226,7 +221,7 @@ put_cont (void *cls,
226 name, 221 name,
227 (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); 222 (success == GNUNET_OK) ? "SUCCESS" : "FAIL");
228 /* Create derived hash */ 223 /* Create derived hash */
229 GNUNET_GNSRECORD_query_from_private_key (privkey, 224 GNUNET_GNSRECORD_query_from_private_key (&privkey,
230 name, 225 name,
231 &derived_hash); 226 &derived_hash);
232 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -251,9 +246,8 @@ run (void *cls,
251 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 246 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
252 &endbadly, 247 &endbadly,
253 NULL); 248 NULL);
254 privkey = GNUNET_CRYPTO_ecdsa_key_create (); 249 GNUNET_CRYPTO_ecdsa_key_create (&privkey);
255 GNUNET_assert (privkey != NULL); 250 GNUNET_CRYPTO_ecdsa_key_get_public (&privkey,
256 GNUNET_CRYPTO_ecdsa_key_get_public (privkey,
257 &pubkey); 251 &pubkey);
258 rd.flags = GNUNET_GNSRECORD_RF_NONE; 252 rd.flags = GNUNET_GNSRECORD_RF_NONE;
259 rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000; 253 rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 1000000000;
@@ -269,7 +263,7 @@ run (void *cls,
269 nch = GNUNET_NAMECACHE_connect (cfg); 263 nch = GNUNET_NAMECACHE_connect (cfg);
270 GNUNET_break (NULL != nch); 264 GNUNET_break (NULL != nch);
271 nsqe = GNUNET_NAMESTORE_records_store (nsh, 265 nsqe = GNUNET_NAMESTORE_records_store (nsh,
272 privkey, 266 &privkey,
273 name, 267 name,
274 1, 268 1,
275 &rd, 269 &rd,