helper library for handling HELLOs More...
#include "platform.h"
#include "gnunet_signatures.h"
#include "gnunet_hello_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_util_lib.h"
Go to the source code of this file.
Data Structures | |
struct | SignedAddress |
Binary block we sign when we sign an address. More... | |
Functions | |
GNUNET_NETWORK_STRUCT_END void | GNUNET_HELLO_sign_address (const char *address, enum GNUNET_NetworkType nt, struct GNUNET_TIME_Absolute mono_time, const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key, void **result, size_t *result_size) |
Build address record by signing raw information with private key. More... | |
char * | GNUNET_HELLO_extract_address (const void *raw, size_t raw_size, const struct GNUNET_PeerIdentity *pid, enum GNUNET_NetworkType *nt, struct GNUNET_TIME_Absolute *mono_time) |
Check signature and extract address record. More... | |
char * | GNUNET_HELLO_address_to_prefix (const char *address) |
Given an address as a string, extract the prefix that identifies the communicator offering transmissions to that address. More... | |
helper library for handling HELLOs
Definition in file hello-ng.c.
char * GNUNET_HELLO_extract_address | ( | const void * | raw, |
size_t | raw_size, | ||
const struct GNUNET_PeerIdentity * | pid, | ||
enum GNUNET_NetworkType * | nt, | ||
struct GNUNET_TIME_Absolute * | mono_time | ||
) |
Check signature and extract address record.
raw | raw signed address |
raw_size | size of raw |
pid | public key to use for signature verification |
nt[out] | set to network type |
mono_time[out] | when was the address generated |
Definition at line 107 of file hello-ng.c.
References GNUNET_TIME_Absolute::abs_value_us, SignedAddress::addr_hash, data, GNUNET_break_op, GNUNET_CRYPTO_eddsa_verify, GNUNET_CRYPTO_hash(), GNUNET_free, GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS, GNUNET_strdup, GNUNET_STRINGS_base64_decode(), GNUNET_TIME_absolute_hton(), GNUNET_YES, SignedAddress::mono_time, nt, pid, GNUNET_PeerIdentity::public_key, GNUNET_CRYPTO_EccSignaturePurpose::purpose, SignedAddress::purpose, raw, sc, and GNUNET_CRYPTO_EccSignaturePurpose::size.