diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-22 17:29:01 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-22 17:29:01 +0100 |
commit | ca90313490f4233ce9d209abbdcc2d78d16b8326 (patch) | |
tree | ae0743a71f00cd744ba2368cb45c9a4f3949752c /src/include/gnunet_hello_lib.h | |
parent | ae82c19b277ae3f5f43379ed6fc384aba4fdea83 (diff) | |
download | gnunet-ca90313490f4233ce9d209abbdcc2d78d16b8326.tar.gz gnunet-ca90313490f4233ce9d209abbdcc2d78d16b8326.zip |
add new hello generation support logic to tng
Diffstat (limited to 'src/include/gnunet_hello_lib.h')
-rw-r--r-- | src/include/gnunet_hello_lib.h | 37 |
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 | */ | ||
488 | void | ||
489 | GNUNET_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 | */ | ||
505 | char * | ||
506 | GNUNET_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 |