diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-14 19:47:32 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-10-15 12:11:18 +0200 |
commit | 96c802b46be51e5c45f34e2de823f787d26c2929 (patch) | |
tree | 457ccfd8f9a61563af86318739c4a8f964a57025 /src/include/gnunet_gnsrecord_lib.h | |
parent | c14e3a2769ff0f15fdbb32797e37e43ce2344fa3 (diff) | |
download | gnunet-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.h | 24 |
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 |
38 | extern "C" { | 40 | extern "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 | */ |
490 | const char * | 492 | const char * |
491 | GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); | 493 | GNUNET_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 | */ |
504 | const char * | 506 | const char * |
505 | GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | 507 | GNUNET_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 | */ |
517 | int | 519 | int |
518 | GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, | 520 | GNUNET_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 | */ |
529 | void | 531 | void |
530 | GNUNET_GNSRECORD_query_from_private_key ( | 532 | GNUNET_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 | */ |
542 | void | 544 | void |
543 | GNUNET_GNSRECORD_query_from_public_key ( | 545 | GNUNET_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 | */ |
557 | struct GNUNET_GNSRECORD_Block * | 559 | struct GNUNET_GNSRECORD_Block * |
558 | GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 560 | GNUNET_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 | */ |
576 | struct GNUNET_GNSRECORD_Block * | 578 | struct GNUNET_GNSRECORD_Block * |
577 | GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 579 | GNUNET_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); | |||
606 | int | 608 | int |
607 | GNUNET_GNSRECORD_block_decrypt ( | 609 | GNUNET_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 | ||