aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnsrecord/gnsrecord_misc.c')
-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 */