[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: GNS: Fix hash for storage key to include
From: |
gnunet |
Subject: |
[gnunet] branch master updated: GNS: Fix hash for storage key to include zone type as specified in LSD0001. |
Date: |
Wed, 28 Jun 2023 22:44:33 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 40b9351a3 GNS: Fix hash for storage key to include zone type as
specified in LSD0001.
40b9351a3 is described below
commit 40b9351a334b6f1ef0a9d088394c278ea4908c96
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Jun 28 22:43:49 2023 +0200
GNS: Fix hash for storage key to include zone type as specified in
LSD0001.
---
src/gnsrecord/gnsrecord_crypto.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index e6036b72b..eaa36426c 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -195,6 +195,7 @@ block_get_size_ecdsa (const struct GNUNET_GNSRECORD_Data
*rd,
return len;
}
+
enum GNUNET_GenericReturnValue
block_sign_ecdsa (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *key,
@@ -400,6 +401,7 @@ block_create_ecdsa (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *key,
return GNUNET_OK;
}
+
static ssize_t
block_get_size_eddsa (const struct GNUNET_GNSRECORD_Data *rd,
unsigned int rd_count)
@@ -505,6 +507,7 @@ block_create_eddsa (const struct
GNUNET_CRYPTO_EddsaPrivateKey *key,
return GNUNET_OK;
}
+
ssize_t
GNUNET_GNSRECORD_block_calculate_size (const struct
GNUNET_IDENTITY_PrivateKey *key,
@@ -531,6 +534,7 @@ GNUNET_GNSRECORD_block_calculate_size (const struct
}
+
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_block_create (const struct GNUNET_IDENTITY_PrivateKey *key,
struct GNUNET_TIME_Absolute expire,
@@ -655,7 +659,6 @@ block_create2 (const struct GNUNET_IDENTITY_PrivateKey
*pkey,
}
-
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_block_create_unsigned (const struct
GNUNET_IDENTITY_PrivateKey *pkey,
@@ -669,7 +672,6 @@ GNUNET_GNSRECORD_block_create_unsigned (const struct
}
-
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_block_create2 (const struct GNUNET_IDENTITY_PrivateKey *pkey,
struct GNUNET_TIME_Absolute expire,
@@ -681,6 +683,7 @@ GNUNET_GNSRECORD_block_create2 (const struct
GNUNET_IDENTITY_PrivateKey *pkey,
return block_create2 (pkey, expire, label, rd, rd_count, result, GNUNET_YES);
}
+
/**
* Check if a signature is valid. This API is used by the GNS Block
* to validate signatures received from the network.
@@ -1064,8 +1067,8 @@ GNUNET_GNSRECORD_query_from_public_key (const struct
norm_label,
"gns",
&pd.ecdsa_key);
- GNUNET_CRYPTO_hash (&pd.ecdsa_key,
- sizeof (pd.ecdsa_key),
+ GNUNET_CRYPTO_hash (&pd,
+ GNUNET_IDENTITY_public_key_get_length (&pd),
query);
break;
case GNUNET_GNSRECORD_TYPE_EDKEY:
@@ -1075,7 +1078,7 @@ GNUNET_GNSRECORD_query_from_public_key (const struct
"gns",
&(pd.eddsa_key));
GNUNET_CRYPTO_hash (&pd.eddsa_key,
- sizeof (pd.eddsa_key),
+ GNUNET_IDENTITY_public_key_get_length (&pd),
query);
break;
default:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: GNS: Fix hash for storage key to include zone type as specified in LSD0001.,
gnunet <=