diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 14:14:01 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 14:14:01 +0000 |
commit | 5e828dc0248330d772913795257b3fda14fe9552 (patch) | |
tree | 362ecdb95dcb89c56a7f20d31b06efa7351fe8ba /src/namestore/test_namestore_api_create_update.c | |
parent | 780fdda9a42441ecf36482461ebd35e4ec5c7510 (diff) | |
download | gnunet-5e828dc0248330d772913795257b3fda14fe9552.tar.gz gnunet-5e828dc0248330d772913795257b3fda14fe9552.zip |
- changes to signing verfifying: includes block expiration
Diffstat (limited to 'src/namestore/test_namestore_api_create_update.c')
-rw-r--r-- | src/namestore/test_namestore_api_create_update.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c index 4f8f6e05f..9e8f9c4d4 100644 --- a/src/namestore/test_namestore_api_create_update.c +++ b/src/namestore/test_namestore_api_create_update.c | |||
@@ -176,7 +176,7 @@ void name_lookup_second_proc (void *cls, | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(&pubkey, n, rd_count, rd, signature)) | 179 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(&pubkey, expire, n, rd_count, rd, signature)) |
180 | { | 180 | { |
181 | GNUNET_break (0); | 181 | GNUNET_break (0); |
182 | failed = GNUNET_YES; | 182 | failed = GNUNET_YES; |
@@ -185,7 +185,7 @@ void name_lookup_second_proc (void *cls, | |||
185 | struct GNUNET_NAMESTORE_RecordData rd_new[2]; | 185 | struct GNUNET_NAMESTORE_RecordData rd_new[2]; |
186 | rd_new[0] = *s_first_record; | 186 | rd_new[0] = *s_first_record; |
187 | rd_new[1] = *s_second_record; | 187 | rd_new[1] = *s_second_record; |
188 | s_signature_updated = GNUNET_NAMESTORE_create_signature(privkey, s_name, rd_new, 2); | 188 | s_signature_updated = GNUNET_NAMESTORE_create_signature(privkey, expire, s_name, rd_new, 2); |
189 | 189 | ||
190 | if (0 != memcmp (s_signature_updated, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 190 | if (0 != memcmp (s_signature_updated, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) |
191 | { | 191 | { |
@@ -274,7 +274,7 @@ void name_lookup_initial_proc (void *cls, | |||
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(&pubkey, n, rd_count, rd, signature)) | 277 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature(&pubkey, expire, n, rd_count, rd, signature)) |
278 | { | 278 | { |
279 | GNUNET_break (0); | 279 | GNUNET_break (0); |
280 | failed = GNUNET_YES; | 280 | failed = GNUNET_YES; |
@@ -462,7 +462,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
462 | char rd_ser[rd_ser_len]; | 462 | char rd_ser[rd_ser_len]; |
463 | GNUNET_NAMESTORE_records_serialize(1, s_first_record, rd_ser_len, rd_ser); | 463 | GNUNET_NAMESTORE_records_serialize(1, s_first_record, rd_ser_len, rd_ser); |
464 | 464 | ||
465 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, s_name, s_first_record, 1); | 465 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, s_first_record->expiration, s_name, s_first_record, 1); |
466 | 466 | ||
467 | /* create random zone hash */ | 467 | /* create random zone hash */ |
468 | GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 468 | GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); |