diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-19 17:11:46 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-19 17:11:46 +0000 |
commit | 5a943624e2634d632ee2bf3a78c25b0aeae3813e (patch) | |
tree | e1fb2539304003d54d0d1e6ea0fdfd3730eb697c /src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |
parent | 34243a1a0c04ef5723a327124f96e2571ac5fd2e (diff) | |
download | gnunet-5a943624e2634d632ee2bf3a78c25b0aeae3813e.tar.gz gnunet-5a943624e2634d632ee2bf3a78c25b0aeae3813e.zip |
- usage of short hashes
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_specific_zone.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_specific_zone.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index 2c03c82d6..550662e1f 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -38,11 +38,11 @@ static struct GNUNET_OS_Process *arm; | |||
38 | 38 | ||
39 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 39 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; |
40 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 40 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; |
41 | static GNUNET_HashCode zone; | 41 | static struct GNUNET_CRYPTO_ShortHashCode zone; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; | 43 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; |
44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; | 44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; |
45 | static GNUNET_HashCode zone2; | 45 | static struct GNUNET_CRYPTO_ShortHashCode zone2; |
46 | 46 | ||
47 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; | 47 | static struct GNUNET_NAMESTORE_ZoneIterator *zi; |
48 | static int res; | 48 | static int res; |
@@ -206,7 +206,7 @@ void zone_proc (void *cls, | |||
206 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 206 | const struct GNUNET_CRYPTO_RsaSignature *signature) |
207 | { | 207 | { |
208 | int failed = GNUNET_NO; | 208 | int failed = GNUNET_NO; |
209 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for zone `%s'\n", GNUNET_h2s (&zone)); | 209 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for zone `%s'\n", GNUNET_short_h2s (&zone)); |
210 | if ((zone_key == NULL) && (name == NULL)) | 210 | if ((zone_key == NULL) && (name == NULL)) |
211 | { | 211 | { |
212 | GNUNET_break (2 == returned_records); | 212 | GNUNET_break (2 == returned_records); |
@@ -326,7 +326,7 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
326 | res = 1; | 326 | res = 1; |
327 | returned_records = 0; | 327 | returned_records = 0; |
328 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All records created, starting iteration over zone `%s'\n", | 328 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All records created, starting iteration over zone `%s'\n", |
329 | GNUNET_h2s(&zone)); | 329 | GNUNET_short_h2s(&zone)); |
330 | zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, | 330 | zi = GNUNET_NAMESTORE_zone_iteration_start(nsh, |
331 | &zone, | 331 | &zone, |
332 | GNUNET_NAMESTORE_RF_NONE, | 332 | GNUNET_NAMESTORE_RF_NONE, |
@@ -375,7 +375,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
375 | GNUNET_free (hostkey_file); | 375 | GNUNET_free (hostkey_file); |
376 | GNUNET_assert (privkey != NULL); | 376 | GNUNET_assert (privkey != NULL); |
377 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 377 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); |
378 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); | 378 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone); |
379 | 379 | ||
380 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zkey"); | 380 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zkey"); |
381 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 381 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
@@ -383,7 +383,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
383 | GNUNET_free (hostkey_file); | 383 | GNUNET_free (hostkey_file); |
384 | GNUNET_assert (privkey2 != NULL); | 384 | GNUNET_assert (privkey2 != NULL); |
385 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); | 385 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); |
386 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); | 386 | GNUNET_CRYPTO_short_hash (&pubkey2, sizeof (pubkey), &zone2); |
387 | 387 | ||
388 | 388 | ||
389 | start_arm (cfgfile); | 389 | start_arm (cfgfile); |