aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_gnsrecord_lib.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-14 19:47:32 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-15 12:11:18 +0200
commit96c802b46be51e5c45f34e2de823f787d26c2929 (patch)
tree457ccfd8f9a61563af86318739c4a8f964a57025 /src/include/gnunet_gnsrecord_lib.h
parentc14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff)
downloadgnunet-96c802b46be51e5c45f34e2de823f787d26c2929.tar.gz
gnunet-96c802b46be51e5c45f34e2de823f787d26c2929.zip
- towards crypto agility; wip
Diffstat (limited to 'src/include/gnunet_gnsrecord_lib.h')
-rw-r--r--src/include/gnunet_gnsrecord_lib.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index 960203fb1..6124b2925 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -34,6 +34,8 @@
34#ifndef GNUNET_GNSRECORD_LIB_H 34#ifndef GNUNET_GNSRECORD_LIB_H
35#define GNUNET_GNSRECORD_LIB_H 35#define GNUNET_GNSRECORD_LIB_H
36 36
37#include "gnunet_identity_service.h"
38
37#ifdef __cplusplus 39#ifdef __cplusplus
38extern "C" { 40extern "C" {
39#if 0 /* keep Emacsens' auto-indent happy */ 41#if 0 /* keep Emacsens' auto-indent happy */
@@ -55,7 +57,7 @@ extern "C" {
55/** 57/**
56 * Record type for GNS zone transfer ("PKEY"). 58 * Record type for GNS zone transfer ("PKEY").
57 */ 59 */
58#define GNUNET_GNSRECORD_TYPE_PKEY 65536 60#define GNUNET_GNSRECORD_TYPE_PKEY GNUNET_IDENTITY_TYPE_ECDSA
59 61
60/** 62/**
61 * Record type for GNS nick names ("NICK"). 63 * Record type for GNS nick names ("NICK").
@@ -275,7 +277,7 @@ struct GNUNET_GNSRECORD_Block
275 /** 277 /**
276 * Derived key used for signing; hash of this is the query. 278 * Derived key used for signing; hash of this is the query.
277 */ 279 */
278 struct GNUNET_CRYPTO_EcdsaPublicKey derived_key; 280 struct GNUNET_IDENTITY_PublicKey derived_key;
279 281
280 /** 282 /**
281 * Number of bytes signed; also specifies the number of bytes 283 * Number of bytes signed; also specifies the number of bytes
@@ -335,7 +337,7 @@ struct GNUNET_GNSRECORD_ReverseRecord
335 /** 337 /**
336 * The public key of the namespace the is delegating to our namespace 338 * The public key of the namespace the is delegating to our namespace
337 */ 339 */
338 struct GNUNET_CRYPTO_EcdsaPublicKey pkey; 340 struct GNUNET_IDENTITY_PublicKey pkey;
339 341
340 /** 342 /**
341 * The expiration time of the delegation 343 * The expiration time of the delegation
@@ -488,7 +490,7 @@ GNUNET_GNSRECORD_string_to_lowercase (const char *src);
488 * #GNUNET_GNSRECORD_z2s. 490 * #GNUNET_GNSRECORD_z2s.
489 */ 491 */
490const char * 492const char *
491GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); 493GNUNET_GNSRECORD_z2s (const struct GNUNET_IDENTITY_PublicKey *z);
492 494
493 495
494/** 496/**
@@ -502,7 +504,7 @@ GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z);
502 * key in an encoding suitable for DNS labels. 504 * key in an encoding suitable for DNS labels.
503 */ 505 */
504const char * 506const char *
505GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); 507GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_IDENTITY_PublicKey *pkey);
506 508
507 509
508/** 510/**
@@ -516,7 +518,7 @@ GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey);
516 */ 518 */
517int 519int
518GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, 520GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey,
519 struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); 521 struct GNUNET_IDENTITY_PublicKey *pkey);
520 522
521 523
522/** 524/**
@@ -528,7 +530,7 @@ GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey,
528 */ 530 */
529void 531void
530GNUNET_GNSRECORD_query_from_private_key ( 532GNUNET_GNSRECORD_query_from_private_key (
531 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const char *label, 533 const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label,
532 struct GNUNET_HashCode *query); 534 struct GNUNET_HashCode *query);
533 535
534 536
@@ -541,7 +543,7 @@ GNUNET_GNSRECORD_query_from_private_key (
541 */ 543 */
542void 544void
543GNUNET_GNSRECORD_query_from_public_key ( 545GNUNET_GNSRECORD_query_from_public_key (
544 const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, const char *label, 546 const struct GNUNET_IDENTITY_PublicKey *pub, const char *label,
545 struct GNUNET_HashCode *query); 547 struct GNUNET_HashCode *query);
546 548
547 549
@@ -555,7 +557,7 @@ GNUNET_GNSRECORD_query_from_public_key (
555 * @param rd_count number of records in @a rd 557 * @param rd_count number of records in @a rd
556 */ 558 */
557struct GNUNET_GNSRECORD_Block * 559struct GNUNET_GNSRECORD_Block *
558GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, 560GNUNET_GNSRECORD_block_create (const struct GNUNET_IDENTITY_PrivateKey *key,
559 struct GNUNET_TIME_Absolute expire, 561 struct GNUNET_TIME_Absolute expire,
560 const char *label, 562 const char *label,
561 const struct GNUNET_GNSRECORD_Data *rd, 563 const struct GNUNET_GNSRECORD_Data *rd,
@@ -574,7 +576,7 @@ GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
574 * @param rd_count number of records in @a rd 576 * @param rd_count number of records in @a rd
575 */ 577 */
576struct GNUNET_GNSRECORD_Block * 578struct GNUNET_GNSRECORD_Block *
577GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, 579GNUNET_GNSRECORD_block_create2 (const struct GNUNET_IDENTITY_PrivateKey *key,
578 struct GNUNET_TIME_Absolute expire, 580 struct GNUNET_TIME_Absolute expire,
579 const char *label, 581 const char *label,
580 const struct GNUNET_GNSRECORD_Data *rd, 582 const struct GNUNET_GNSRECORD_Data *rd,
@@ -606,7 +608,7 @@ GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block);
606int 608int
607GNUNET_GNSRECORD_block_decrypt ( 609GNUNET_GNSRECORD_block_decrypt (
608 const struct GNUNET_GNSRECORD_Block *block, 610 const struct GNUNET_GNSRECORD_Block *block,
609 const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, const char *label, 611 const struct GNUNET_IDENTITY_PublicKey *zone_key, const char *label,
610 GNUNET_GNSRECORD_RecordCallback proc, void *proc_cls); 612 GNUNET_GNSRECORD_RecordCallback proc, void *proc_cls);
611 613
612 614