diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 12:04:06 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 12:04:06 +0000 |
commit | defe6ca74853b18bfe38d379859811b39edc75a0 (patch) | |
tree | addab2be42c7aea401965b289bfb911ab49bf057 /src/namestore/test_namestore_api_zone_iteration_stop.c | |
parent | 3e25c4304d9da8b5dd236cae109194cd0e7db733 (diff) | |
download | gnunet-defe6ca74853b18bfe38d379859811b39edc75a0.tar.gz gnunet-defe6ca74853b18bfe38d379859811b39edc75a0.zip |
- mod test_case
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_stop.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index ef55df62f..c99d91b63 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -224,6 +224,15 @@ void zone_proc (void *cls, | |||
224 | } | 224 | } |
225 | else | 225 | else |
226 | { | 226 | { |
227 | |||
228 | /* verify signature returned from name store */ | ||
229 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(zone_key, name, rd_count, rd, signature)) | ||
230 | { | ||
231 | failed = GNUNET_YES; | ||
232 | GNUNET_break (0); | ||
233 | } | ||
234 | |||
235 | |||
227 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Comparing results name %s \n", name); | 236 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Comparing results name %s \n", name); |
228 | if (0 == strcmp (name, s_name_1)) | 237 | if (0 == strcmp (name, s_name_1)) |
229 | { /* name_1 */ | 238 | { /* name_1 */ |
@@ -261,8 +270,8 @@ void zone_proc (void *cls, | |||
261 | failed = GNUNET_YES; | 270 | failed = GNUNET_YES; |
262 | GNUNET_break (0); | 271 | GNUNET_break (0); |
263 | } | 272 | } |
264 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_verify_signature(&pubkey2, s_name_2, rd_count, rd, sig_2)); | 273 | |
265 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 274 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(&pubkey2, s_name_2, 1, s_rd_2, signature)) |
266 | { | 275 | { |
267 | failed = GNUNET_YES; | 276 | failed = GNUNET_YES; |
268 | GNUNET_break (0); | 277 | GNUNET_break (0); |