#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnsrecord_crypto.h"
#include <inttypes.h>
Go to the source code of this file.
Functions | |
static int | parsehex (const char *src, char *dst, size_t dstlen, int invert) |
static void | print_bytes_ (void *buf, size_t buf_len, int fold, int in_be) |
static void | print_bytes (void *buf, size_t buf_len, int fold) |
static void | print_record (const struct GNUNET_GNSRECORD_Data *rd) |
static void | run_pkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label) |
Main function that will be run. More... | |
static void | run_edkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label) |
Main function that will be run. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run. More... | |
int | main (int argc, char *const *argv) |
The main function of the test vector generation tool. More... | |
Variables | |
static const char * | d_pkey |
static const char * | d_edkey |
|
static |
Definition at line 41 of file gnunet-gnsrecord-tvg.c.
Referenced by run(), run_edkey(), and run_pkey().
|
static |
Definition at line 62 of file gnunet-gnsrecord-tvg.c.
Referenced by print_bytes(), and run_pkey().
|
static |
Definition at line 92 of file gnunet-gnsrecord-tvg.c.
References print_bytes_().
Referenced by print_record(), run_edkey(), and run_pkey().
|
static |
Definition at line 101 of file gnunet-gnsrecord-tvg.c.
References GNUNET_TIME_Absolute::abs_value_us, GNUNET_GNSRECORD_Data::data, GNUNET_GNSRECORD_Data::data_size, GNUNET_GNSRECORD_Data::expiration_time, GNUNET_GNSRECORD_Data::flags, GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION, GNUNET_htonll(), GNUNET_ntohll(), GNUNET_TIME_relative_to_absolute(), print_bytes(), rd, GNUNET_GNSRECORD_Data::record_type, and GNUNET_TIME_Relative::rel_value_us.
Referenced by run_edkey(), and run_pkey().
|
static |
Main function that will be run.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 141 of file gnunet-gnsrecord-tvg.c.
References d_pkey, GNUNET_GNSRECORD_Block::ecdsa_block, GNUNET_CRYPTO_PrivateKey::ecdsa_key, GNUNET_CRYPTO_PublicKey::ecdsa_key, expire, GNR_derive_block_aes_key(), GNUNET_assert, GNUNET_CRYPTO_AES_KEY_LENGTH, GNUNET_CRYPTO_ecdsa_key_create(), GNUNET_CRYPTO_ecdsa_private_key_derive(), GNUNET_CRYPTO_ecdsa_public_key_derive(), GNUNET_CRYPTO_key_get_public(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_free, GNUNET_GNSRECORD_block_create(), GNUNET_GNSRECORD_query_from_public_key(), GNUNET_GNSRECORD_record_get_expiration_time(), GNUNET_GNSRECORD_records_get_size(), GNUNET_GNSRECORD_records_serialize(), GNUNET_GNSRECORD_string_normalize(), GNUNET_GNSRECORD_TYPE_PKEY, GNUNET_malloc, GNUNET_OK, GNUNET_STRINGS_data_to_string(), GNUNET_TIME_absolute_hton(), GNUNET_TIME_UNIT_ZERO_ABS, parsehex(), print_bytes(), print_bytes_(), print_record(), rd, rd_count, GNUNET_GNSRECORD_Block::size, and GNUNET_CRYPTO_PrivateKey::type.
Referenced by run().
|
static |
Main function that will be run.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 284 of file gnunet-gnsrecord-tvg.c.
References d_edkey, GNUNET_CRYPTO_PrivateKey::ecdsa_key, GNUNET_GNSRECORD_Block::eddsa_block, GNUNET_CRYPTO_PrivateKey::eddsa_key, GNUNET_CRYPTO_PublicKey::eddsa_key, expire, GNR_derive_block_xsalsa_key(), GNUNET_assert, GNUNET_CRYPTO_ecdsa_key_create(), GNUNET_CRYPTO_eddsa_key_create(), GNUNET_CRYPTO_eddsa_private_key_derive(), GNUNET_CRYPTO_eddsa_public_key_derive(), GNUNET_CRYPTO_key_get_public(), GNUNET_CRYPTO_public_key_get_length(), GNUNET_free, GNUNET_GNSRECORD_block_create(), GNUNET_GNSRECORD_query_from_public_key(), GNUNET_GNSRECORD_record_get_expiration_time(), GNUNET_GNSRECORD_records_get_size(), GNUNET_GNSRECORD_records_serialize(), GNUNET_GNSRECORD_string_normalize(), GNUNET_GNSRECORD_TYPE_EDKEY, GNUNET_GNSRECORD_TYPE_PKEY, GNUNET_malloc, GNUNET_OK, GNUNET_PUBLIC_KEY_TYPE_EDDSA, GNUNET_STRINGS_data_to_string(), GNUNET_TIME_absolute_hton(), GNUNET_TIME_UNIT_ZERO_ABS, parsehex(), print_bytes(), print_record(), rd, rd_count, GNUNET_CRYPTO_EddsaPrivateScalar::s, GNUNET_GNSRECORD_Block::size, and GNUNET_CRYPTO_PrivateKey::type.
Referenced by run().
|
static |
Main function that will be run.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 440 of file gnunet-gnsrecord-tvg.c.
References GNUNET_TIME_Absolute::abs_value_us, data, GNUNET_GNSRECORD_Data::data, GNUNET_GNSRECORD_Data::data_size, GNUNET_GNSRECORD_Data::expiration_time, GNUNET_GNSRECORD_Data::flags, GNUNET_assert, GNUNET_DNSPARSER_TYPE_AAAA, GNUNET_DNSPARSER_TYPE_TXT, GNUNET_GNSRECORD_RF_CRITICAL, GNUNET_GNSRECORD_RF_NONE, GNUNET_GNSRECORD_RF_SUPPLEMENTAL, GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_TYPE_NICK, GNUNET_GNSRECORD_TYPE_PKEY, GNUNET_OK, GNUNET_TIME_absolute_ntoh(), parsehex(), rd, GNUNET_GNSRECORD_Data::record_type, run_edkey(), and run_pkey().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function of the test vector generation tool.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 518 of file gnunet-gnsrecord-tvg.c.
References GNUNET_assert, GNUNET_GETOPT_OPTION_END, GNUNET_log_setup(), GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_PROGRAM_run(), options, and run().
|
static |
Definition at line 33 of file gnunet-gnsrecord-tvg.c.
Referenced by run_pkey().
|
static |
Definition at line 36 of file gnunet-gnsrecord-tvg.c.
Referenced by run_edkey().