diff options
Diffstat (limited to 'src/namecache/test_namecache_api_cache_block.c')
-rw-r--r-- | src/namecache/test_namecache_api_cache_block.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/namecache/test_namecache_api_cache_block.c b/src/namecache/test_namecache_api_cache_block.c index 12b72d93b..310c4de42 100644 --- a/src/namecache/test_namecache_api_cache_block.c +++ b/src/namecache/test_namecache_api_cache_block.c | |||
@@ -39,9 +39,9 @@ static struct GNUNET_NAMECACHE_Handle *nsh; | |||
39 | 39 | ||
40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; | 42 | static struct GNUNET_IDENTITY_PrivateKey privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 44 | static struct GNUNET_IDENTITY_PublicKey pubkey; |
45 | 45 | ||
46 | static int res; | 46 | static int res; |
47 | 47 | ||
@@ -172,23 +172,13 @@ run (void *cls, | |||
172 | { | 172 | { |
173 | struct GNUNET_GNSRECORD_Data rd; | 173 | struct GNUNET_GNSRECORD_Data rd; |
174 | struct GNUNET_GNSRECORD_Block *block; | 174 | struct GNUNET_GNSRECORD_Block *block; |
175 | char *hostkey_file; | ||
176 | const char *name = "dummy.dummy.gnunet"; | 175 | const char *name = "dummy.dummy.gnunet"; |
177 | 176 | ||
178 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 177 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
179 | &endbadly, NULL); | 178 | &endbadly, NULL); |
180 | GNUNET_asprintf (&hostkey_file, | 179 | privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); |
181 | "zonefiles%s%s", | 180 | GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); |
182 | DIR_SEPARATOR_STR, | 181 | GNUNET_IDENTITY_key_get_public (&privkey, &pubkey); |
183 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | ||
184 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", | ||
185 | hostkey_file); | ||
186 | GNUNET_assert (GNUNET_SYSERR != | ||
187 | GNUNET_CRYPTO_ecdsa_key_from_file (hostkey_file, | ||
188 | GNUNET_YES, | ||
189 | &privkey)); | ||
190 | GNUNET_free (hostkey_file); | ||
191 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); | ||
192 | 182 | ||
193 | 183 | ||
194 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 10000000000; | 184 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us + 10000000000; |