aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
commit6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch)
treea3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src/namestore
parent16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff)
downloadgnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.tar.gz
gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.zip
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-service-namestore.c12
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c2
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index d6c299882..4d497c8a1 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -200,7 +200,7 @@ write_key_to_file (const char *filename, struct GNUNET_NAMESTORE_CryptoContainer
200} 200}
201 201
202int zone_to_disk_it (void *cls, 202int zone_to_disk_it (void *cls,
203 const GNUNET_HashCode *key, 203 const struct GNUNET_HashCode *key,
204 void *value) 204 void *value)
205{ 205{
206 struct GNUNET_NAMESTORE_CryptoContainer * c = value; 206 struct GNUNET_NAMESTORE_CryptoContainer * c = value;
@@ -391,7 +391,7 @@ handle_lookup_name_it (void *cls,
391 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL; 391 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL;
392 struct GNUNET_TIME_Absolute e; 392 struct GNUNET_TIME_Absolute e;
393 struct GNUNET_CRYPTO_ShortHashCode zone_key_hash; 393 struct GNUNET_CRYPTO_ShortHashCode zone_key_hash;
394 GNUNET_HashCode long_hash; 394 struct GNUNET_HashCode long_hash;
395 char *rd_tmp; 395 char *rd_tmp;
396 char *name_tmp; 396 char *name_tmp;
397 size_t rd_ser_len; 397 size_t rd_ser_len;
@@ -862,7 +862,7 @@ static void handle_record_create (void *cls,
862 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; 862 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
863 struct RecordCreateResponseMessage rcr_msg; 863 struct RecordCreateResponseMessage rcr_msg;
864 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 864 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
865 GNUNET_HashCode long_hash; 865 struct GNUNET_HashCode long_hash;
866 size_t name_len; 866 size_t name_len;
867 size_t msg_size; 867 size_t msg_size;
868 size_t msg_size_exp; 868 size_t msg_size_exp;
@@ -1116,7 +1116,7 @@ static void handle_record_remove (void *cls,
1116 struct GNUNET_NAMESTORE_CryptoContainer *cc = NULL; 1116 struct GNUNET_NAMESTORE_CryptoContainer *cc = NULL;
1117 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; 1117 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
1118 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 1118 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
1119 GNUNET_HashCode long_hash; 1119 struct GNUNET_HashCode long_hash;
1120 char * pkey_tmp = NULL; 1120 char * pkey_tmp = NULL;
1121 char * name_tmp = NULL; 1121 char * name_tmp = NULL;
1122 char * rd_ser = NULL; 1122 char * rd_ser = NULL;
@@ -1462,7 +1462,7 @@ void zone_iteraterate_proc (void *cls,
1462 struct GNUNET_CRYPTO_RsaSignature * new_signature; 1462 struct GNUNET_CRYPTO_RsaSignature * new_signature;
1463 struct GNUNET_NAMESTORE_CryptoContainer *cc; 1463 struct GNUNET_NAMESTORE_CryptoContainer *cc;
1464 struct GNUNET_CRYPTO_ShortHashCode hash; 1464 struct GNUNET_CRYPTO_ShortHashCode hash;
1465 GNUNET_HashCode long_hash; 1465 struct GNUNET_HashCode long_hash;
1466 struct GNUNET_TIME_Absolute e; 1466 struct GNUNET_TIME_Absolute e;
1467 unsigned int rd_count_filtered = 0; 1467 unsigned int rd_count_filtered = 0;
1468 int include; 1468 int include;
@@ -1837,7 +1837,7 @@ static void handle_iteration_next (void *cls,
1837 1837
1838int zonekey_file_it (void *cls, const char *filename) 1838int zonekey_file_it (void *cls, const char *filename)
1839{ 1839{
1840 GNUNET_HashCode long_hash; 1840 struct GNUNET_HashCode long_hash;
1841 int *counter = cls; 1841 int *counter = cls;
1842 if ((filename != NULL) && (NULL != strstr(filename, ".zkey"))) 1842 if ((filename != NULL) && (NULL != strstr(filename, ".zkey")))
1843 { 1843 {
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 8c3227874..329602d41 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -48,7 +48,7 @@ static struct GNUNET_OS_Process *arm;
48static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 48static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
49static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 49static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
50struct GNUNET_CRYPTO_RsaSignature *s_signature; 50struct GNUNET_CRYPTO_RsaSignature *s_signature;
51static GNUNET_HashCode s_zone; 51static struct GNUNET_HashCode s_zone;
52struct GNUNET_NAMESTORE_RecordData *s_rd; 52struct GNUNET_NAMESTORE_RecordData *s_rd;
53static char *s_name; 53static char *s_name;
54 54
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index 066554187..f18aad93f 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -38,11 +38,11 @@ static struct GNUNET_OS_Process *arm;
38 38
39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
41static GNUNET_HashCode zone; 41static struct GNUNET_HashCode zone;
42 42
43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; 43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; 44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
45static GNUNET_HashCode zone2; 45static struct GNUNET_HashCode zone2;
46 46
47static struct GNUNET_NAMESTORE_ZoneIterator *zi; 47static struct GNUNET_NAMESTORE_ZoneIterator *zi;
48static int res; 48static int res;
@@ -222,7 +222,7 @@ void zone_proc (void *cls,
222 /* verify signature returned from name store */ 222 /* verify signature returned from name store */
223 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature)) 223 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature))
224 { 224 {
225 GNUNET_HashCode zone_key_hash; 225 struct GNUNET_HashCode zone_key_hash;
226 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash); 226 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash);
227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); 227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value);
228 228
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 9f62c73b6..90031edc7 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -38,11 +38,11 @@ static struct GNUNET_OS_Process *arm;
38 38
39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
41static GNUNET_HashCode zone; 41static struct GNUNET_HashCode zone;
42 42
43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; 43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; 44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
45static GNUNET_HashCode zone2; 45static struct GNUNET_HashCode zone2;
46 46
47static struct GNUNET_NAMESTORE_ZoneIterator *zi; 47static struct GNUNET_NAMESTORE_ZoneIterator *zi;
48static int res; 48static int res;