aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnsrecord/gnsrecord_crypto.c')
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index 890ddb011..a1870feba 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -223,7 +223,6 @@ block_create_ecdsa (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
223 unsigned char ctr[GNUNET_CRYPTO_AES_KEY_LENGTH / 2]; 223 unsigned char ctr[GNUNET_CRYPTO_AES_KEY_LENGTH / 2];
224 unsigned char skey[GNUNET_CRYPTO_AES_KEY_LENGTH]; 224 unsigned char skey[GNUNET_CRYPTO_AES_KEY_LENGTH];
225 struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)]; 225 struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)];
226 uint32_t rd_count_nbo;
227 struct GNUNET_TIME_Absolute now; 226 struct GNUNET_TIME_Absolute now;
228 227
229 if (payload_len < 0) 228 if (payload_len < 0)
@@ -348,7 +347,6 @@ block_create_eddsa (const struct GNUNET_CRYPTO_EddsaPrivateKey *key,
348 unsigned char nonce[crypto_secretbox_NONCEBYTES]; 347 unsigned char nonce[crypto_secretbox_NONCEBYTES];
349 unsigned char skey[crypto_secretbox_KEYBYTES]; 348 unsigned char skey[crypto_secretbox_KEYBYTES];
350 struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)]; 349 struct GNUNET_GNSRECORD_Data rdc[GNUNET_NZL (rd_count)];
351 uint32_t rd_count_nbo;
352 struct GNUNET_TIME_Absolute now; 350 struct GNUNET_TIME_Absolute now;
353 351
354 if (payload_len < 0) 352 if (payload_len < 0)
@@ -438,7 +436,7 @@ GNUNET_GNSRECORD_block_calculate_size (const struct
438 unsigned int rd_count) 436 unsigned int rd_count)
439{ 437{
440 struct GNUNET_IDENTITY_PublicKey pkey; 438 struct GNUNET_IDENTITY_PublicKey pkey;
441 ssize_t res; 439 ssize_t res = -1;
442 440
443 GNUNET_IDENTITY_key_get_public (key, 441 GNUNET_IDENTITY_key_get_public (key,
444 &pkey); 442 &pkey);
@@ -453,7 +451,7 @@ GNUNET_GNSRECORD_block_calculate_size (const struct
453 default: 451 default:
454 GNUNET_assert (0); 452 GNUNET_assert (0);
455 } 453 }
456 return -1; 454 return res;
457 455
458} 456}
459 457
@@ -754,7 +752,6 @@ block_decrypt_eddsa (const struct GNUNET_GNSRECORD_Block *block,
754 GNUNET_GNSRECORD_RecordCallback proc, 752 GNUNET_GNSRECORD_RecordCallback proc,
755 void *proc_cls) 753 void *proc_cls)
756{ 754{
757 const struct GNUNET_GNSRECORD_EddsaBlock *edblock = &block->eddsa_block;
758 size_t payload_len = ntohl (block->size) - sizeof (struct 755 size_t payload_len = ntohl (block->size) - sizeof (struct
759 GNUNET_GNSRECORD_Block); 756 GNUNET_GNSRECORD_Block);
760 unsigned char nonce[crypto_secretbox_NONCEBYTES]; 757 unsigned char nonce[crypto_secretbox_NONCEBYTES];