aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_hello_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_hello_lib.h')
-rw-r--r--src/include/gnunet_hello_lib.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index 2a961e524..e19419f25 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -473,6 +473,43 @@ GNUNET_HELLO_parse_uri (const char *uri,
473 GNUNET_HELLO_TransportPluginsFind plugins_find); 473 GNUNET_HELLO_TransportPluginsFind plugins_find);
474 474
475 475
476
477/* NG API */
478
479/**
480 * Build address record by signing raw information with private key.
481 *
482 * @param address text address to sign
483 * @param expiration how long is @a address valid
484 * @param private_key signing key to use
485 * @param result[out] where to write address record (allocated)
486 * @param result_size[out] set to size of @a result
487 */
488void
489GNUNET_HELLO_sign_address (const char *address,
490 struct GNUNET_TIME_Absolute expiration,
491 const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key,
492 void **result,
493 size_t *result_size);
494
495
496/**
497 * Check signature and extract address record.
498 *
499 * @param raw raw signed address
500 * @param raw_size size of @a raw
501 * @param public_key public key to use for signature verification
502 * @param expiration[out] how long is the address valid
503 * @return NULL on error, otherwise the address
504 */
505char *
506GNUNET_HELLO_extract_address (const void *raw,
507 size_t raw_size,
508 const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
509 struct GNUNET_TIME_Absolute *expiration);
510
511
512
476#if 0 /* keep Emacsens' auto-indent happy */ 513#if 0 /* keep Emacsens' auto-indent happy */
477{ 514{
478#endif 515#endif