aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_pseudonym.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/test_pseudonym.c')
-rw-r--r--src/fs/test_pseudonym.c156
1 files changed, 78 insertions, 78 deletions
diff --git a/src/fs/test_pseudonym.c b/src/fs/test_pseudonym.c
index 5247d6dcc..0615f5a5b 100644
--- a/src/fs/test_pseudonym.c
+++ b/src/fs/test_pseudonym.c
@@ -33,17 +33,17 @@
33 33
34static struct GNUNET_CONTAINER_MetaData *meta; 34static struct GNUNET_CONTAINER_MetaData *meta;
35 35
36static struct GNUNET_PseudonymIdentifier id1; 36static struct GNUNET_FS_PseudonymIdentifier id1;
37 37
38 38
39static int 39static int
40iter (void *cls, const struct GNUNET_PseudonymIdentifier * pseudonym, 40iter (void *cls, const struct GNUNET_FS_PseudonymIdentifier * pseudonym,
41 const char *name, const char *unique_name, 41 const char *name, const char *unique_name,
42 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating) 42 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating)
43{ 43{
44 int *ok = cls; 44 int *ok = cls;
45 45
46 if ((0 == memcmp (pseudonym, &id1, sizeof (struct GNUNET_PseudonymIdentifier))) && 46 if ((0 == memcmp (pseudonym, &id1, sizeof (struct GNUNET_FS_PseudonymIdentifier))) &&
47 (!GNUNET_CONTAINER_meta_data_test_equal (md, meta))) 47 (!GNUNET_CONTAINER_meta_data_test_equal (md, meta)))
48 { 48 {
49 *ok = GNUNET_NO; 49 *ok = GNUNET_NO;
@@ -54,7 +54,7 @@ iter (void *cls, const struct GNUNET_PseudonymIdentifier * pseudonym,
54 54
55 55
56static int 56static int
57noti_callback (void *cls, const struct GNUNET_PseudonymIdentifier * pseudonym, 57noti_callback (void *cls, const struct GNUNET_FS_PseudonymIdentifier * pseudonym,
58 const char *name, const char *unique_name, 58 const char *name, const char *unique_name,
59 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating) 59 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating)
60{ 60{
@@ -66,7 +66,7 @@ noti_callback (void *cls, const struct GNUNET_PseudonymIdentifier * pseudonym,
66 66
67 67
68static int 68static int
69fake_noti_callback (void *cls, const struct GNUNET_PseudonymIdentifier * pseudonym, 69fake_noti_callback (void *cls, const struct GNUNET_FS_PseudonymIdentifier * pseudonym,
70 const char *name, const char *unique_name, 70 const char *name, const char *unique_name,
71 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating) 71 const struct GNUNET_CONTAINER_MetaData *md, int32_t rating)
72{ 72{
@@ -78,13 +78,13 @@ fake_noti_callback (void *cls, const struct GNUNET_PseudonymIdentifier * pseudon
78 78
79 79
80static void 80static void
81create_pseu (struct GNUNET_PseudonymIdentifier *pseu) 81create_pseu (struct GNUNET_FS_PseudonymIdentifier *pseu)
82{ 82{
83 struct GNUNET_PseudonymHandle *ph; 83 struct GNUNET_FS_PseudonymHandle *ph;
84 84
85 ph = GNUNET_PSEUDONYM_create (NULL); 85 ph = GNUNET_FS_pseudonym_create (NULL);
86 GNUNET_PSEUDONYM_get_identifier (ph, pseu); 86 GNUNET_FS_pseudonym_get_identifier (ph, pseu);
87 GNUNET_PSEUDONYM_destroy (ph); 87 GNUNET_FS_pseudonym_destroy (ph);
88} 88}
89 89
90 90
@@ -95,11 +95,11 @@ static int
95test_io () 95test_io ()
96{ 96{
97 int ok; 97 int ok;
98 struct GNUNET_PseudonymIdentifier rid1; 98 struct GNUNET_FS_PseudonymIdentifier rid1;
99 struct GNUNET_PseudonymIdentifier id2; 99 struct GNUNET_FS_PseudonymIdentifier id2;
100 struct GNUNET_PseudonymIdentifier rid2; 100 struct GNUNET_FS_PseudonymIdentifier rid2;
101 struct GNUNET_PseudonymIdentifier fid; 101 struct GNUNET_FS_PseudonymIdentifier fid;
102 struct GNUNET_PseudonymIdentifier id3; 102 struct GNUNET_FS_PseudonymIdentifier id3;
103 int old; 103 int old;
104 int newVal; 104 int newVal;
105 struct GNUNET_CONFIGURATION_Handle *cfg; 105 struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -112,8 +112,8 @@ test_io ()
112 int noname_is_a_dup; 112 int noname_is_a_dup;
113 int notiCount, fakenotiCount; 113 int notiCount, fakenotiCount;
114 static char m[1024 * 1024 * 10]; 114 static char m[1024 * 1024 * 10];
115 struct GNUNET_PSEUDONYM_DiscoveryHandle *dh1; 115 struct GNUNET_FS_pseudonym_DiscoveryHandle *dh1;
116 struct GNUNET_PSEUDONYM_DiscoveryHandle *dh2; 116 struct GNUNET_FS_pseudonym_DiscoveryHandle *dh2;
117 117
118 memset (m, 'b', sizeof (m)); 118 memset (m, 'b', sizeof (m));
119 m[sizeof (m) - 1] = '\0'; 119 m[sizeof (m) - 1] = '\0';
@@ -130,30 +130,30 @@ test_io ()
130 } 130 }
131 notiCount = 0; 131 notiCount = 0;
132 fakenotiCount = 0; 132 fakenotiCount = 0;
133 dh1 = GNUNET_PSEUDONYM_discovery_callback_register (cfg, &fake_noti_callback, 133 dh1 = GNUNET_FS_pseudonym_discovery_callback_register (cfg, &fake_noti_callback,
134 &fakenotiCount); 134 &fakenotiCount);
135 dh2 = GNUNET_PSEUDONYM_discovery_callback_register (cfg, &noti_callback, 135 dh2 = GNUNET_FS_pseudonym_discovery_callback_register (cfg, &noti_callback,
136 &notiCount); 136 &notiCount);
137 GNUNET_PSEUDONYM_discovery_callback_unregister (dh1); 137 GNUNET_FS_pseudonym_discovery_callback_unregister (dh1);
138 138
139 /* ACTUAL TEST CODE */ 139 /* ACTUAL TEST CODE */
140 old = GNUNET_PSEUDONYM_list_all (cfg, NULL, NULL); 140 old = GNUNET_FS_pseudonym_list_all (cfg, NULL, NULL);
141 meta = GNUNET_CONTAINER_meta_data_create (); 141 meta = GNUNET_CONTAINER_meta_data_create ();
142 GNUNET_CONTAINER_meta_data_insert (meta, "<test>", EXTRACTOR_METATYPE_TITLE, 142 GNUNET_CONTAINER_meta_data_insert (meta, "<test>", EXTRACTOR_METATYPE_TITLE,
143 EXTRACTOR_METAFORMAT_UTF8, "text/plain", 143 EXTRACTOR_METAFORMAT_UTF8, "text/plain",
144 "test", strlen ("test") + 1); 144 "test", strlen ("test") + 1);
145 create_pseu (&id1); 145 create_pseu (&id1);
146 GNUNET_PSEUDONYM_add (cfg, &id1, meta); 146 GNUNET_FS_pseudonym_add (cfg, &id1, meta);
147 CHECK (notiCount == 1); 147 CHECK (notiCount == 1);
148 GNUNET_PSEUDONYM_add (cfg, &id1, meta); 148 GNUNET_FS_pseudonym_add (cfg, &id1, meta);
149 CHECK (notiCount == 2); 149 CHECK (notiCount == 2);
150 newVal = GNUNET_PSEUDONYM_list_all (cfg, &iter, &ok); 150 newVal = GNUNET_FS_pseudonym_list_all (cfg, &iter, &ok);
151 CHECK (old < newVal); 151 CHECK (old < newVal);
152 old = newVal; 152 old = newVal;
153 create_pseu (&id2); 153 create_pseu (&id2);
154 GNUNET_PSEUDONYM_add (cfg, &id2, meta); 154 GNUNET_FS_pseudonym_add (cfg, &id2, meta);
155 CHECK (notiCount == 3); 155 CHECK (notiCount == 3);
156 newVal = GNUNET_PSEUDONYM_list_all (cfg, &iter, &ok); 156 newVal = GNUNET_FS_pseudonym_list_all (cfg, &iter, &ok);
157 CHECK (old < newVal); 157 CHECK (old < newVal);
158 GNUNET_assert (GNUNET_OK == 158 GNUNET_assert (GNUNET_OK ==
159 GNUNET_CONTAINER_meta_data_insert (meta, "<test>", 159 GNUNET_CONTAINER_meta_data_insert (meta, "<test>",
@@ -162,36 +162,36 @@ test_io ()
162 "text/plain", m, 162 "text/plain", m,
163 strlen (m) + 1)); 163 strlen (m) + 1));
164 create_pseu (&id3); 164 create_pseu (&id3);
165 GNUNET_PSEUDONYM_add (cfg, &id3, meta); 165 GNUNET_FS_pseudonym_add (cfg, &id3, meta);
166 GNUNET_PSEUDONYM_get_info (cfg, &id3, NULL, NULL, &name3, NULL); 166 GNUNET_FS_pseudonym_get_info (cfg, &id3, NULL, NULL, &name3, NULL);
167 CHECK (name3 != NULL); 167 CHECK (name3 != NULL);
168 GNUNET_PSEUDONYM_get_info (cfg, &id2, NULL, NULL, &name2, NULL); 168 GNUNET_FS_pseudonym_get_info (cfg, &id2, NULL, NULL, &name2, NULL);
169 CHECK (name2 != NULL); 169 CHECK (name2 != NULL);
170 GNUNET_PSEUDONYM_get_info (cfg, &id1, NULL, NULL, &name1, NULL); 170 GNUNET_FS_pseudonym_get_info (cfg, &id1, NULL, NULL, &name1, NULL);
171 CHECK (name1 != NULL); 171 CHECK (name1 != NULL);
172 CHECK (0 == strcmp (name1, name2)); 172 CHECK (0 == strcmp (name1, name2));
173 name1_unique = GNUNET_PSEUDONYM_name_uniquify (cfg, &id1, name1, NULL); 173 name1_unique = GNUNET_FS_pseudonym_name_uniquify (cfg, &id1, name1, NULL);
174 name2_unique = GNUNET_PSEUDONYM_name_uniquify (cfg, &id2, name2, NULL); 174 name2_unique = GNUNET_FS_pseudonym_name_uniquify (cfg, &id2, name2, NULL);
175 CHECK (0 != strcmp (name1_unique, name2_unique)); 175 CHECK (0 != strcmp (name1_unique, name2_unique));
176 CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, "fake", &rid2)); 176 CHECK (GNUNET_SYSERR == GNUNET_FS_pseudonym_name_to_id (cfg, "fake", &rid2));
177 CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, name2, &rid2)); 177 CHECK (GNUNET_SYSERR == GNUNET_FS_pseudonym_name_to_id (cfg, name2, &rid2));
178 CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, name1, &rid1)); 178 CHECK (GNUNET_SYSERR == GNUNET_FS_pseudonym_name_to_id (cfg, name1, &rid1));
179 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name2_unique, &rid2)); 179 CHECK (GNUNET_OK == GNUNET_FS_pseudonym_name_to_id (cfg, name2_unique, &rid2));
180 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name1_unique, &rid1)); 180 CHECK (GNUNET_OK == GNUNET_FS_pseudonym_name_to_id (cfg, name1_unique, &rid1));
181 CHECK (0 == memcmp (&id1, &rid1, sizeof (struct GNUNET_PseudonymIdentifier))); 181 CHECK (0 == memcmp (&id1, &rid1, sizeof (struct GNUNET_FS_PseudonymIdentifier)));
182 CHECK (0 == memcmp (&id2, &rid2, sizeof (struct GNUNET_PseudonymIdentifier))); 182 CHECK (0 == memcmp (&id2, &rid2, sizeof (struct GNUNET_FS_PseudonymIdentifier)));
183 183
184 create_pseu (&fid); 184 create_pseu (&fid);
185 GNUNET_log_skip (1, GNUNET_NO); 185 GNUNET_log_skip (1, GNUNET_NO);
186 CHECK (0 == GNUNET_PSEUDONYM_rank (cfg, &fid, 0)); 186 CHECK (0 == GNUNET_FS_pseudonym_rank (cfg, &fid, 0));
187 GNUNET_log_skip (0, GNUNET_NO); 187 GNUNET_log_skip (0, GNUNET_NO);
188 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_get_info (cfg, &fid, NULL, NULL, &noname, &noname_is_a_dup)); 188 CHECK (GNUNET_OK == GNUNET_FS_pseudonym_get_info (cfg, &fid, NULL, NULL, &noname, &noname_is_a_dup));
189 CHECK (noname != NULL); 189 CHECK (noname != NULL);
190 CHECK (noname_is_a_dup == GNUNET_YES); 190 CHECK (noname_is_a_dup == GNUNET_YES);
191 CHECK (0 == GNUNET_PSEUDONYM_rank (cfg, &id1, 0)); 191 CHECK (0 == GNUNET_FS_pseudonym_rank (cfg, &id1, 0));
192 CHECK (5 == GNUNET_PSEUDONYM_rank (cfg, &id1, 5)); 192 CHECK (5 == GNUNET_FS_pseudonym_rank (cfg, &id1, 5));
193 CHECK (-5 == GNUNET_PSEUDONYM_rank (cfg, &id1, -10)); 193 CHECK (-5 == GNUNET_FS_pseudonym_rank (cfg, &id1, -10));
194 CHECK (0 == GNUNET_PSEUDONYM_rank (cfg, &id1, 5)); 194 CHECK (0 == GNUNET_FS_pseudonym_rank (cfg, &id1, 5));
195 GNUNET_free (name1); 195 GNUNET_free (name1);
196 GNUNET_free (name2); 196 GNUNET_free (name2);
197 GNUNET_free (name1_unique); 197 GNUNET_free (name1_unique);
@@ -200,7 +200,7 @@ test_io ()
200 GNUNET_free (noname); 200 GNUNET_free (noname);
201 /* END OF TEST CODE */ 201 /* END OF TEST CODE */
202FAILURE: 202FAILURE:
203 GNUNET_PSEUDONYM_discovery_callback_unregister (dh2); 203 GNUNET_FS_pseudonym_discovery_callback_unregister (dh2);
204 GNUNET_CONTAINER_meta_data_destroy (meta); 204 GNUNET_CONTAINER_meta_data_destroy (meta);
205 GNUNET_CONFIGURATION_destroy (cfg); 205 GNUNET_CONFIGURATION_destroy (cfg);
206 return (ok == GNUNET_YES) ? 0 : 1; 206 return (ok == GNUNET_YES) ? 0 : 1;
@@ -211,38 +211,38 @@ FAILURE:
211 * Use the given input to sign and check the resulting signature. 211 * Use the given input to sign and check the resulting signature.
212 */ 212 */
213static void 213static void
214test_signature (struct GNUNET_PseudonymHandle *ph, 214test_signature (struct GNUNET_FS_PseudonymHandle *ph,
215 struct GNUNET_PseudonymSignaturePurpose *purpose, 215 struct GNUNET_FS_PseudonymSignaturePurpose *purpose,
216 struct GNUNET_HashCode *seed, 216 struct GNUNET_HashCode *seed,
217 struct GNUNET_HashCode *signing_key, 217 struct GNUNET_HashCode *signing_key,
218 char *bit) 218 char *bit)
219{ 219{
220 struct GNUNET_PseudonymSignature signature; 220 struct GNUNET_FS_PseudonymSignature signature;
221 struct GNUNET_PseudonymSignature signature2; 221 struct GNUNET_FS_PseudonymSignature signature2;
222 struct GNUNET_PseudonymIdentifier pseudonym; 222 struct GNUNET_FS_PseudonymIdentifier pseudonym;
223 struct GNUNET_PseudonymIdentifier verification_key; 223 struct GNUNET_FS_PseudonymIdentifier verification_key;
224 224
225 GNUNET_PSEUDONYM_sign (ph, purpose, seed, signing_key, &signature); 225 GNUNET_FS_pseudonym_sign (ph, purpose, seed, signing_key, &signature);
226 if (0) 226 if (0)
227 { 227 {
228 GNUNET_PSEUDONYM_sign (ph, purpose, seed, signing_key, &signature2); 228 GNUNET_FS_pseudonym_sign (ph, purpose, seed, signing_key, &signature2);
229 /* with seed, two sigs must be identical, without, they must be different! */ 229 /* with seed, two sigs must be identical, without, they must be different! */
230 if (NULL != seed) 230 if (NULL != seed)
231 GNUNET_break (0 == memcmp (&signature, &signature2, sizeof (signature))); 231 GNUNET_break (0 == memcmp (&signature, &signature2, sizeof (signature)));
232 else /* crypto not implemented, thus for now 'break' */ 232 else /* crypto not implemented, thus for now 'break' */
233 GNUNET_break (0 != memcmp (&signature, &signature2, sizeof (signature))); 233 GNUNET_break (0 != memcmp (&signature, &signature2, sizeof (signature)));
234 } 234 }
235 GNUNET_PSEUDONYM_get_identifier (ph, &pseudonym); 235 GNUNET_FS_pseudonym_get_identifier (ph, &pseudonym);
236 GNUNET_PSEUDONYM_derive_verification_key (&pseudonym, 236 GNUNET_FS_pseudonym_derive_verification_key (&pseudonym,
237 signing_key, 237 signing_key,
238 &verification_key); 238 &verification_key);
239 GNUNET_break (GNUNET_OK == 239 GNUNET_break (GNUNET_OK ==
240 GNUNET_PSEUDONYM_verify (purpose, &signature, &verification_key)); 240 GNUNET_FS_pseudonym_verify (purpose, &signature, &verification_key));
241 /* also check that if the data is changed, the signature no longer matches */ 241 /* also check that if the data is changed, the signature no longer matches */
242 (*bit)++; 242 (*bit)++;
243 /* crypto not implemented, thus for now 'break' */ 243 /* crypto not implemented, thus for now 'break' */
244 GNUNET_break (GNUNET_OK != 244 GNUNET_break (GNUNET_OK !=
245 GNUNET_PSEUDONYM_verify (purpose, &signature, &verification_key)); 245 GNUNET_FS_pseudonym_verify (purpose, &signature, &verification_key));
246 (*bit)--; 246 (*bit)--;
247} 247}
248 248
@@ -253,21 +253,21 @@ test_signature (struct GNUNET_PseudonymHandle *ph,
253 * @param ph private key to test 253 * @param ph private key to test
254 */ 254 */
255static void 255static void
256test_crypto_ops (struct GNUNET_PseudonymHandle *ph) 256test_crypto_ops (struct GNUNET_FS_PseudonymHandle *ph)
257{ 257{
258 char data[16]; 258 char data[16];
259 struct GNUNET_PseudonymSignaturePurpose *purpose; 259 struct GNUNET_FS_PseudonymSignaturePurpose *purpose;
260 struct GNUNET_HashCode seed; 260 struct GNUNET_HashCode seed;
261 struct GNUNET_HashCode signing_key; 261 struct GNUNET_HashCode signing_key;
262 262
263 memset (data, 42, sizeof (data)); 263 memset (data, 42, sizeof (data));
264 purpose = (struct GNUNET_PseudonymSignaturePurpose *) data; 264 purpose = (struct GNUNET_FS_PseudonymSignaturePurpose *) data;
265 purpose->size = htonl (sizeof (data)); 265 purpose->size = htonl (sizeof (data));
266 purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST); 266 purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_TEST);
267 memset (&seed, 41, sizeof (seed)); 267 memset (&seed, 41, sizeof (seed));
268 memset (&signing_key, 40, sizeof (signing_key)); 268 memset (&signing_key, 40, sizeof (signing_key));
269 test_signature (ph, purpose, &seed, &signing_key, &data[sizeof (struct GNUNET_PseudonymSignaturePurpose)]); 269 test_signature (ph, purpose, &seed, &signing_key, &data[sizeof (struct GNUNET_FS_PseudonymSignaturePurpose)]);
270 test_signature (ph, purpose, NULL, &signing_key, &data[sizeof (struct GNUNET_PseudonymSignaturePurpose)]); 270 test_signature (ph, purpose, NULL, &signing_key, &data[sizeof (struct GNUNET_FS_PseudonymSignaturePurpose)]);
271} 271}
272 272
273 273
@@ -277,36 +277,36 @@ test_crypto_ops (struct GNUNET_PseudonymHandle *ph)
277static int 277static int
278test_crypto () 278test_crypto ()
279{ 279{
280 struct GNUNET_PseudonymHandle *ph; 280 struct GNUNET_FS_PseudonymHandle *ph;
281 struct GNUNET_PseudonymIdentifier pseudonym; 281 struct GNUNET_FS_PseudonymIdentifier pseudonym;
282 struct GNUNET_PseudonymIdentifier pseudonym2; 282 struct GNUNET_FS_PseudonymIdentifier pseudonym2;
283 283
284 /* check writing to and reading from disk */ 284 /* check writing to and reading from disk */
285 ph = GNUNET_PSEUDONYM_create ("/tmp/gnunet-pseudonym-test/pseu.dsa"); 285 ph = GNUNET_FS_pseudonym_create ("/tmp/gnunet-pseudonym-test/pseu.dsa");
286 GNUNET_PSEUDONYM_get_identifier (ph, &pseudonym); 286 GNUNET_FS_pseudonym_get_identifier (ph, &pseudonym);
287 GNUNET_PSEUDONYM_destroy (ph); 287 GNUNET_FS_pseudonym_destroy (ph);
288 ph = GNUNET_PSEUDONYM_create ("/tmp/gnunet-pseudonym-test/pseu.dsa"); 288 ph = GNUNET_FS_pseudonym_create ("/tmp/gnunet-pseudonym-test/pseu.dsa");
289 GNUNET_PSEUDONYM_get_identifier (ph, &pseudonym2); 289 GNUNET_FS_pseudonym_get_identifier (ph, &pseudonym2);
290 test_crypto_ops (ph); 290 test_crypto_ops (ph);
291 GNUNET_PSEUDONYM_destroy (ph); 291 GNUNET_FS_pseudonym_destroy (ph);
292 if (0 != memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym))) 292 if (0 != memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym)))
293 return 1; 293 return 1;
294 294
295 /* check in-memory generation */ 295 /* check in-memory generation */
296 ph = GNUNET_PSEUDONYM_create (NULL); 296 ph = GNUNET_FS_pseudonym_create (NULL);
297 GNUNET_PSEUDONYM_get_identifier (ph, &pseudonym2); 297 GNUNET_FS_pseudonym_get_identifier (ph, &pseudonym2);
298 if (0 == memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym))) 298 if (0 == memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym)))
299 return 1; 299 return 1;
300 test_crypto_ops (ph); 300 test_crypto_ops (ph);
301 GNUNET_PSEUDONYM_destroy (ph); 301 GNUNET_FS_pseudonym_destroy (ph);
302 302
303 /* check anonymous pseudonym operations generation */ 303 /* check anonymous pseudonym operations generation */
304 ph = GNUNET_PSEUDONYM_get_anonymous_pseudonym_handle (); 304 ph = GNUNET_FS_pseudonym_get_anonymous_pseudonym_handle ();
305 GNUNET_PSEUDONYM_get_identifier (ph, &pseudonym2); 305 GNUNET_FS_pseudonym_get_identifier (ph, &pseudonym2);
306 if (0 == memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym))) 306 if (0 == memcmp (&pseudonym, &pseudonym2, sizeof (pseudonym)))
307 return 1; 307 return 1;
308 test_crypto_ops (ph); 308 test_crypto_ops (ph);
309 GNUNET_PSEUDONYM_destroy (ph); 309 GNUNET_FS_pseudonym_destroy (ph);
310 return 0; 310 return 0;
311} 311}
312 312