aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-10-29 18:06:26 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-10-29 18:06:26 +0900
commit0f2da4636e108c70697c589d9e38781f2bafefba (patch)
tree0e831befd71d4323596cdae55e8431df7720c531 /src/gnsrecord
parent4e2259f14be320c8e2fe2a672a473e09677269c4 (diff)
downloadgnunet-0f2da4636e108c70697c589d9e38781f2bafefba.tar.gz
gnunet-0f2da4636e108c70697c589d9e38781f2bafefba.zip
IDENTITY
This commit is a major rework of the unclean GNUNET_IDENTITY_*Key structures and its use in serialized objects (e.g. RPC messages). The structures are now no longer to be used directly but instead through their serialization helper functions whenever needed.
Diffstat (limited to 'src/gnsrecord')
-rw-r--r--src/gnsrecord/gnsrecord_misc.c2
-rw-r--r--src/gnsrecord/gnunet-gnsrecord-tvg.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 742eaf186..97ca7b135 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -304,7 +304,7 @@ GNUNET_GNSRECORD_data_from_identity (const struct
304{ 304{
305 char *tmp; 305 char *tmp;
306 *type = ntohl (key->type); 306 *type = ntohl (key->type);
307 *data_size = GNUNET_IDENTITY_key_get_length (key) - sizeof (key->type); 307 *data_size = GNUNET_IDENTITY_public_key_get_length (key) - sizeof (key->type);
308 if (0 == *data_size) 308 if (0 == *data_size)
309 return GNUNET_SYSERR; 309 return GNUNET_SYSERR;
310 tmp = GNUNET_malloc (*data_size); 310 tmp = GNUNET_malloc (*data_size);
diff --git a/src/gnsrecord/gnunet-gnsrecord-tvg.c b/src/gnsrecord/gnunet-gnsrecord-tvg.c
index 4d5eb73b3..91abe1954 100644
--- a/src/gnsrecord/gnunet-gnsrecord-tvg.c
+++ b/src/gnsrecord/gnunet-gnsrecord-tvg.c
@@ -154,10 +154,10 @@ run_pkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label)
154 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), 8, 1); 154 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), 8, 1);
155 printf ("\n"); 155 printf ("\n");
156 printf ("Zone identifier (ztype|zkey):\n"); 156 printf ("Zone identifier (ztype|zkey):\n");
157 GNUNET_assert (0 < GNUNET_IDENTITY_key_get_length (&id_pub)); 157 GNUNET_assert (0 < GNUNET_IDENTITY_public_key_get_length (&id_pub));
158 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); 158 print_bytes (&id_pub, GNUNET_IDENTITY_public_key_get_length (&id_pub), 8);
159 GNUNET_STRINGS_data_to_string (&id_pub, 159 GNUNET_STRINGS_data_to_string (&id_pub,
160 GNUNET_IDENTITY_key_get_length (&id_pub), 160 GNUNET_IDENTITY_public_key_get_length (&id_pub),
161 ztld, 161 ztld,
162 sizeof (ztld)); 162 sizeof (ztld));
163 printf ("\n"); 163 printf ("\n");
@@ -280,10 +280,10 @@ run_edkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char*label)
280 GNUNET_CRYPTO_EddsaPrivateKey), 8); 280 GNUNET_CRYPTO_EddsaPrivateKey), 8);
281 printf ("\n"); 281 printf ("\n");
282 printf ("Zone identifier (ztype|zkey):\n"); 282 printf ("Zone identifier (ztype|zkey):\n");
283 GNUNET_assert (0 < GNUNET_IDENTITY_key_get_length (&id_pub)); 283 GNUNET_assert (0 < GNUNET_IDENTITY_public_key_get_length (&id_pub));
284 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); 284 print_bytes (&id_pub, GNUNET_IDENTITY_public_key_get_length (&id_pub), 8);
285 GNUNET_STRINGS_data_to_string (&id_pub, 285 GNUNET_STRINGS_data_to_string (&id_pub,
286 GNUNET_IDENTITY_key_get_length (&id_pub), 286 GNUNET_IDENTITY_public_key_get_length (&id_pub),
287 ztld, 287 ztld,
288 sizeof (ztld)); 288 sizeof (ztld));
289 printf ("\n"); 289 printf ("\n");