aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-14 23:57:25 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:20 +0200
commitdba32dc385bf922c7cd91eecc209e1a37b96c137 (patch)
treee894b28b71b7a7baec59e713fbda59f0c4edb624 /src/gnsrecord
parent25eb1fb2acbe92b418d8643c06107ce0ab2bfb9a (diff)
downloadgnunet-dba32dc385bf922c7cd91eecc209e1a37b96c137.tar.gz
gnunet-dba32dc385bf922c7cd91eecc209e1a37b96c137.zip
- more fixes towards crypto agility
Diffstat (limited to 'src/gnsrecord')
-rw-r--r--src/gnsrecord/gnsrecord_misc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index baf13e963..cfe310422 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -325,5 +325,22 @@ GNUNET_GNSRECORD_query_from_block (const struct GNUNET_GNSRECORD_Block *block,
325 325
326} 326}
327 327
328enum GNUNET_GenericReturnValue
329GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd,
330 struct GNUNET_IDENTITY_PublicKey *key)
331{
332 switch (ntohl (rd->record_type))
333 {
334 case GNUNET_GNSRECORD_TYPE_PKEY:
335 key->type = htonl (rd->record_type);
336 memcpy (&key->ecdsa_key, rd->data, sizeof (key->ecdsa_key));
337 return GNUNET_OK;
338 default:
339 return GNUNET_SYSERR;
340 }
341 return GNUNET_SYSERR;
342
343
344}
328 345
329/* end of gnsrecord_misc.c */ 346/* end of gnsrecord_misc.c */