GNUnet 0.21.1
gnunet-gns-import.c File Reference
Include dependency graph for gnunet-gns-import.c:

Go to the source code of this file.

Functions

static int run_process_and_wait (enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, enum GNUNET_OS_ProcessStatusType *st, unsigned long *code, const char *filename,...)
 
static void check_pkey (unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd, char *pk, int *found_rec)
 
static void zone_iterator (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, const char *rname, unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd)
 Process a record that was stored in the namestore. More...
 
static void zone_iteration_error (void *cls)
 
static void zone_iteration_finished (void *cls)
 
static void get_ego (void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *identifier)
 Get master-zone and private-zone keys. More...
 
static void shutdown_task (void *cls)
 Task run on shutdown. More...
 
static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
 Main function that will be run. More...
 
int main (int argc, char *const *argv)
 The main function for gnunet-gns. More...
 

Variables

static const struct GNUNET_CONFIGURATION_Handlecfg
 Configuration we are using. More...
 
static struct GNUNET_IDENTITY_Handlesh
 Handle to IDENTITY service. More...
 
struct GNUNET_NAMESTORE_ZoneIteratorlist_it
 Zone iterator for master zone. More...
 
static struct GNUNET_NAMESTORE_Handlens
 Handle to the namestore. More...
 
static char * master_zone_pkey
 String version of PKEY for master-zone. More...
 
static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk
 Binary version of PKEY for master-zone. More...
 
static char * private_zone_pkey
 String version of PKEY for private-zone. More...
 
static char * pin_zone_pkey
 String version of PKEY for pin-zone. More...
 
static int found_private_rec = GNUNET_NO
 Set to GNUNET_YES if private record was found;. More...
 
static int found_pin_rec = GNUNET_NO
 Set to GNUNET_YES if pin record was found;. More...
 
static int ret
 Exit code. More...
 

Function Documentation

◆ run_process_and_wait()

static int run_process_and_wait ( enum GNUNET_OS_InheritStdioFlags  std_inheritance,
struct GNUNET_DISK_PipeHandle pipe_stdin,
struct GNUNET_DISK_PipeHandle pipe_stdout,
enum GNUNET_OS_ProcessStatusType st,
unsigned long *  code,
const char *  filename,
  ... 
)
static

Definition at line 90 of file gnunet-gns-import.c.

96{
97 static struct GNUNET_OS_Process *p;
98 int arglen;
99 char *arg;
100 char *args;
101 char *argp;
102 va_list ap, apc1, apc2;
103
104 va_start (ap, filename);
105 va_copy (apc1, ap);
106 va_copy (apc2, ap);
107 arglen = 0;
108 while (NULL != (arg = va_arg (apc1, char *)))
109 arglen += strlen (arg) + 1;
110 va_end (apc1);
111 args = argp = GNUNET_malloc (arglen);
112 while (NULL != (arg = va_arg (apc2, char *)))
113 {
114 strcpy (argp, arg);
115 argp += strlen (arg);
116 *argp = ' ';
117 argp += 1;
118 }
119 va_end (apc2);
120 if (arglen > 0)
121 argp[-1] = '\0';
122 p = GNUNET_OS_start_process_va (std_inheritance,
123 pipe_stdin,
124 pipe_stdout,
125 NULL,
126 filename, ap);
127 va_end (ap);
128 if (NULL == p)
129 {
130 ret = 3;
131 fprintf (stderr, "Failed to run `%s'\n", args);
133 return 1;
134 }
135
137 {
138 ret = 4;
139 fprintf (stderr, "Failed to wait for `%s'\n", args);
141 return 1;
142 }
143
144 switch (GNUNET_OS_process_status (p, st, code))
145 {
146 case GNUNET_OK:
147 break;
148
149 case GNUNET_NO:
150 ret = 5;
151 fprintf (stderr, "`%s' is still running\n", args);
153 return 1;
154
155 default:
156 case GNUNET_SYSERR:
157 ret = 6;
158 fprintf (stderr, "Failed to check the status of `%s'\n", args);
160 return 1;
161 }
162 return 0;
163}
static struct GNUNET_SCHEDULER_Task * st
The shutdown task.
static char * filename
static int ret
Exit code.
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-uri.c:38
@ GNUNET_OK
@ GNUNET_NO
@ GNUNET_SYSERR
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
enum GNUNET_GenericReturnValue GNUNET_OS_process_status(struct GNUNET_OS_Process *proc, enum GNUNET_OS_ProcessStatusType *type, unsigned long *code)
Retrieve the status of a process.
Definition: os_priority.c:859
enum GNUNET_GenericReturnValue GNUNET_OS_process_wait(struct GNUNET_OS_Process *proc)
Wait for a process to terminate.
Definition: os_priority.c:877
struct GNUNET_OS_Process * GNUNET_OS_start_process_va(enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, struct GNUNET_DISK_PipeHandle *pipe_stderr, const char *filename, va_list va)
Start a process.
Definition: os_priority.c:591

References find_typedefs::arg, consensus-simulation::args, filename, GNUNET_free, GNUNET_malloc, GNUNET_NO, GNUNET_OK, GNUNET_OS_process_status(), GNUNET_OS_process_wait(), GNUNET_OS_start_process_va(), GNUNET_SYSERR, p, ret, and st.

Referenced by run(), and zone_iteration_error().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_pkey()

static void check_pkey ( unsigned int  rd_len,
const struct GNUNET_GNSRECORD_Data rd,
char *  pk,
int *  found_rec 
)
static

Definition at line 167 of file gnunet-gns-import.c.

169{
170 int i;
172
173 for (i = 0; i < rd_len; i++)
174 {
175 char *s;
176 if (sizeof (uint32_t) > rd[i].data_size)
177 continue;
179 rd[i].data_size,
180 rd[i].record_type,
181 &pubkey))
182 continue;
183 s = GNUNET_GNSRECORD_value_to_string (rd[i].record_type,
184 rd[i].data,
185 rd[i].data_size);
186 if (NULL == s)
187 continue;
188 if (0 == strcmp (s, pk))
189 *found_rec = GNUNET_YES;
190 GNUNET_free (s);
191 }
192}
static char * data
The data to insert into the dht.
struct GNUNET_CRYPTO_PrivateKey pk
Private key from command line option, or NULL.
static struct GNUNET_CRYPTO_PublicKey pubkey
Public key of the zone to look in.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
static size_t data_size
Number of bytes in data.
enum GNUNET_GenericReturnValue GNUNET_GNSRECORD_identity_from_data(const char *data, size_t data_size, uint32_t type, struct GNUNET_CRYPTO_PublicKey *key)
Build a #GNUNET_GNSRECORD_PublicKey from zone delegation resource record data.
char * GNUNET_GNSRECORD_value_to_string(uint32_t type, const void *data, size_t data_size)
Convert the binary value data of a record of type type to a human-readable string.
Definition: gnsrecord.c:155
@ GNUNET_YES
An identity key as per LSD0001.

References data, data_size, GNUNET_free, GNUNET_GNSRECORD_identity_from_data(), GNUNET_GNSRECORD_value_to_string(), GNUNET_OK, GNUNET_YES, pk, pubkey, and rd.

Referenced by zone_iterator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zone_iterator()

static void zone_iterator ( void *  cls,
const struct GNUNET_CRYPTO_EcdsaPrivateKey zone_key,
const char *  rname,
unsigned int  rd_len,
const struct GNUNET_GNSRECORD_Data rd 
)
static

Process a record that was stored in the namestore.

Parameters
clsclosure
zone_keyprivate key of the zone
rnamename that is being mapped (at most 255 characters long)
rd_lennumber of entries in rd array
rdarray of records with data to store

Definition at line 205 of file gnunet-gns-import.c.

209{
210 if (NULL != rname)
211 {
212 if (0 == strcmp (rname, "private"))
214 else if (0 == strcmp (rname, "pin"))
216 }
218}
static void check_pkey(unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd, char *pk, int *found_rec)
static char * private_zone_pkey
String version of PKEY for private-zone.
static int found_private_rec
Set to GNUNET_YES if private record was found;.
struct GNUNET_NAMESTORE_ZoneIterator * list_it
Zone iterator for master zone.
static char * pin_zone_pkey
String version of PKEY for pin-zone.
static int found_pin_rec
Set to GNUNET_YES if pin record was found;.
void GNUNET_NAMESTORE_zone_iterator_next(struct GNUNET_NAMESTORE_ZoneIterator *it, uint64_t limit)
Calls the record processor specified in GNUNET_NAMESTORE_zone_iteration_start for the next record.

References check_pkey(), found_pin_rec, found_private_rec, GNUNET_NAMESTORE_zone_iterator_next(), list_it, pin_zone_pkey, private_zone_pkey, and rd.

Referenced by get_ego().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zone_iteration_error()

static void zone_iteration_error ( void *  cls)
static

Definition at line 222 of file gnunet-gns-import.c.

223{
225 unsigned long code;
226
227 if (! found_private_rec)
228 {
230 NULL, NULL, &st, &code,
231 "gnunet-namestore",
232 "gnunet-namestore", "-z", "master-zone",
233 "-a", "-e", "never", "-n", "private", "-p",
234 "-t", "PKEY", "-V",
235 private_zone_pkey, NULL))
236 {
237 ret = 8;
238 return;
239 }
240 }
241 if (! found_pin_rec)
242 {
244 NULL, NULL, &st, &code,
245 "gnunet-namestore",
246 "gnunet-namestore", "-z", "master-zone",
247 "-a", "-e", "never", "-n", "pin", "-p", "-t",
248 "PKEY", "-V", pin_zone_pkey,
249 NULL))
250 {
251 ret = 10;
252 return;
253 }
254 }
255 list_it = NULL;
257}
static int run_process_and_wait(enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, enum GNUNET_OS_ProcessStatusType *st, unsigned long *code, const char *filename,...)
GNUNET_OS_ProcessStatusType
Process status types.
@ GNUNET_OS_INHERIT_STD_OUT_AND_ERR
When these flags are set, the child process will inherit stdout and stderr of the parent.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:567

References found_pin_rec, found_private_rec, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, GNUNET_SCHEDULER_shutdown(), list_it, pin_zone_pkey, private_zone_pkey, ret, run_process_and_wait(), and st.

Referenced by get_ego().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zone_iteration_finished()

static void zone_iteration_finished ( void *  cls)
static

Definition at line 261 of file gnunet-gns-import.c.

262{
263}

Referenced by get_ego().

Here is the caller graph for this function:

◆ get_ego()

static void get_ego ( void *  cls,
struct GNUNET_IDENTITY_Ego ego,
void **  ctx,
const char *  identifier 
)
static

Get master-zone and private-zone keys.

This function is initially called for all egos and then again whenever a ego's identifier changes or if it is deleted. At the end of the initial pass over all egos, the function is once called with 'NULL' for 'ego'. That does NOT mean that the callback won't be invoked in the future or that there was an error.

When used with 'GNUNET_IDENTITY_create' or 'GNUNET_IDENTITY_get', this function is only called ONCE, and 'NULL' being passed in 'ego' does indicate an error (for example because name is taken or no default value is known). If 'ego' is non-NULL and if '*ctx' is set in those callbacks, the value WILL be passed to a subsequent call to the identity callback of 'GNUNET_IDENTITY_connect' (if that one was not NULL).

When an identity is renamed, this function is called with the (known) ego but the NEW identifier.

When an identity is deleted, this function is called with the (known) ego and "NULL" for the 'identifier'. In this case, the 'ego' is henceforth invalid (and the 'ctx' should also be cleaned up).

Parameters
clsclosure
egoego handle
ctxcontext for application to store data for this ego (during the lifetime of this process, initially NULL)
identifieridentifier assigned by the user for this ego, NULL if the user just deleted the ego and it must thus no longer be used

Definition at line 299 of file gnunet-gns-import.c.

303{
304 static struct GNUNET_CRYPTO_EcdsaPublicKey pk;
305
306 if (NULL == ego)
307 {
308 if ((NULL == master_zone_pkey) ||
309 (NULL == private_zone_pkey) )
310 {
311 ret = 11;
313 return;
314 }
316 &master_pk,
318 NULL, &zone_iterator, NULL,
320 NULL);
321 if (NULL == list_it)
322 {
323 ret = 12;
325 }
326 return;
327 }
329 if (NULL != identifier)
330 {
331 if ((NULL == master_zone_pkey) && (0 == strcmp ("master-zone",
332 identifier)) )
333 {
336 }
337 else if ((NULL == private_zone_pkey) && (0 == strcmp ("private-zone",
338 identifier)) )
340 }
341}
static void zone_iteration_finished(void *cls)
static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk
Binary version of PKEY for master-zone.
static char * master_zone_pkey
String version of PKEY for master-zone.
static void zone_iterator(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, const char *rname, unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd)
Process a record that was stored in the namestore.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
static void zone_iteration_error(void *cls)
const struct GNUNET_CRYPTO_PrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
Definition: identity_api.c:517
void GNUNET_IDENTITY_ego_get_public_key(struct GNUNET_IDENTITY_Ego *ego, struct GNUNET_CRYPTO_PublicKey *pk)
Get the identifier (public key) of an ego.
Definition: identity_api.c:529
char * GNUNET_CRYPTO_ecdsa_public_key_to_string(const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Convert a public key to a string.
Definition: crypto_ecc.c:225
struct GNUNET_NAMESTORE_ZoneIterator * GNUNET_NAMESTORE_zone_iteration_start(struct GNUNET_NAMESTORE_Handle *h, const struct GNUNET_CRYPTO_PrivateKey *zone, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls, GNUNET_SCHEDULER_TaskCallback finish_cb, void *finish_cb_cls)
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...

References GNUNET_CRYPTO_ecdsa_public_key_to_string(), GNUNET_IDENTITY_ego_get_private_key(), GNUNET_IDENTITY_ego_get_public_key(), GNUNET_NAMESTORE_zone_iteration_start(), GNUNET_SCHEDULER_shutdown(), list_it, master_pk, master_zone_pkey, ns, pk, private_zone_pkey, ret, zone_iteration_error(), zone_iteration_finished(), and zone_iterator().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown_task()

static void shutdown_task ( void *  cls)
static

Task run on shutdown.

Parameters
clsNULL

Definition at line 350 of file gnunet-gns-import.c.

351{
353 master_zone_pkey = NULL;
355 private_zone_pkey = NULL;
356 if (NULL != list_it)
357 {
359 list_it = NULL;
360 }
361 if (NULL != ns)
362 {
364 ns = NULL;
365 }
366 if (NULL != sh)
367 {
369 sh = NULL;
370 }
371}
static struct GNUNET_IDENTITY_Handle * sh
Handle to IDENTITY service.
void GNUNET_IDENTITY_disconnect(struct GNUNET_IDENTITY_Handle *h)
Disconnect from identity service.
Definition: identity_api.c:732
void GNUNET_NAMESTORE_disconnect(struct GNUNET_NAMESTORE_Handle *h)
Disconnect from the namestore service (and free associated resources).
void GNUNET_NAMESTORE_zone_iteration_stop(struct GNUNET_NAMESTORE_ZoneIterator *it)
Stops iteration and releases the namestore handle for further calls.

References GNUNET_free, GNUNET_IDENTITY_disconnect(), GNUNET_NAMESTORE_disconnect(), GNUNET_NAMESTORE_zone_iteration_stop(), list_it, master_zone_pkey, ns, private_zone_pkey, and sh.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle c 
)
static

Main function that will be run.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cconfiguration

Definition at line 383 of file gnunet-gns-import.c.

385{
387 unsigned long code;
388
389 cfg = c;
390
392 NULL, NULL, &st, &code,
393 "gnunet-arm",
394 "gnunet-arm", "-I", NULL))
395 {
396 if (7 == ret)
397 fprintf (stderr,
398 "GNUnet is not running, please start GNUnet before running import\n");
399 return;
400 }
401
403 NULL, NULL, &st, &code,
404 "gnunet-identity",
405 "gnunet-identity", "-C", "master-zone", NULL))
406 return;
407
409 NULL, NULL, &st, &code,
410 "gnunet-identity",
411 "gnunet-identity", "-C", "private-zone", NULL))
412 return;
413
415 NULL, NULL, &st, &code,
416 "gnunet-identity",
417 "gnunet-identity", "-C", "sks-zone", NULL))
418 return;
419
421 NULL, NULL, &st, &code,
422 "gnunet-identity",
423 "gnunet-identity", "-e", "master-zone", "-s",
424 "gns-master", NULL))
425 return;
426
428 NULL, NULL, &st, &code,
429 "gnunet-identity",
430 "gnunet-identity", "-e", "master-zone", "-s",
431 "namestore", NULL))
432 return;
433
435 NULL, NULL, &st, &code,
436 "gnunet-identity",
437 "gnunet-identity", "-e", "master-zone", "-s",
438 "gns-proxy", NULL))
439 return;
440
442 NULL, NULL, &st, &code,
443 "gnunet-identity",
444 "gnunet-identity", "-e", "master-zone", "-s",
445 "gns-intercept", NULL))
446 return;
447
449 NULL, NULL, &st, &code,
450 "gnunet-identity",
451 "gnunet-identity", "-e", "private-zone", "-s",
452 "gns-private", NULL))
453 return;
454
456 NULL, NULL, &st, &code,
457 "gnunet-identity",
458 "gnunet-identity", "-e", "sks-zone", "-s",
459 "fs-sks", NULL))
460 return;
461
465}
static void get_ego(void *cls, struct GNUNET_IDENTITY_Ego *ego, void **ctx, const char *identifier)
Get master-zone and private-zone keys.
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static void shutdown_task(void *cls)
Task run on shutdown.
struct GNUNET_IDENTITY_Handle * GNUNET_IDENTITY_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_IDENTITY_Callback cb, void *cb_cls)
Connect to the identity service.
Definition: identity_api.c:487
struct GNUNET_NAMESTORE_Handle * GNUNET_NAMESTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the namestore service.
@ GNUNET_OS_INHERIT_STD_NONE
No standard streams should be inherited.
Definition: gnunet_os_lib.h:77
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
Definition: scheduler.c:1340

References cfg, get_ego(), GNUNET_IDENTITY_connect(), GNUNET_NAMESTORE_connect(), GNUNET_OS_INHERIT_STD_NONE, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, GNUNET_SCHEDULER_add_shutdown(), ns, ret, run_process_and_wait(), sh, shutdown_task(), and st.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function for gnunet-gns.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error

Definition at line 476 of file gnunet-gns-import.c.

477{
478 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
480 };
481 int r;
482
483 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
484 return 2;
485
486 GNUNET_log_setup ("gnunet-gns-import", "WARNING", NULL);
487 ret = 0;
488 r = GNUNET_PROGRAM_run (argc, argv, "gnunet-gns-import",
489 _ (
490 "This program will import some GNS authorities into your GNS namestore."),
491 options,
492 &run, NULL);
493 GNUNET_free_nz ((void *) argv);
494 return GNUNET_OK == r ? ret : 1;
495}
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run.
enum GNUNET_GenericReturnValue GNUNET_log_setup(const char *comp, const char *loglevel, const char *logfile)
Setup logging.
#define GNUNET_free_nz(ptr)
Wrapper around free.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition: program.c:400
enum GNUNET_GenericReturnValue GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1230
#define _(String)
GNU gettext support macro.
Definition: platform.h:178
Definition of a command line option.

References _, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_log_setup(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), options, ret, and run().

Here is the call graph for this function:

Variable Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* cfg
static

Configuration we are using.

Definition at line 35 of file gnunet-gns-import.c.

Referenced by run().

◆ sh

struct GNUNET_IDENTITY_Handle* sh
static

Handle to IDENTITY service.

Definition at line 40 of file gnunet-gns-import.c.

Referenced by run(), and shutdown_task().

◆ list_it

Zone iterator for master zone.

Definition at line 45 of file gnunet-gns-import.c.

Referenced by get_ego(), shutdown_task(), zone_iteration_error(), and zone_iterator().

◆ ns

struct GNUNET_NAMESTORE_Handle* ns
static

Handle to the namestore.

Definition at line 50 of file gnunet-gns-import.c.

Referenced by get_ego(), run(), and shutdown_task().

◆ master_zone_pkey

char* master_zone_pkey
static

String version of PKEY for master-zone.

Definition at line 55 of file gnunet-gns-import.c.

Referenced by get_ego(), and shutdown_task().

◆ master_pk

struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk
static

Binary version of PKEY for master-zone.

Definition at line 60 of file gnunet-gns-import.c.

Referenced by get_ego().

◆ private_zone_pkey

char* private_zone_pkey
static

String version of PKEY for private-zone.

Definition at line 65 of file gnunet-gns-import.c.

Referenced by get_ego(), shutdown_task(), zone_iteration_error(), and zone_iterator().

◆ pin_zone_pkey

char* pin_zone_pkey
static
Initial value:
=
"72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRKOG"

String version of PKEY for pin-zone.

Definition at line 70 of file gnunet-gns-import.c.

Referenced by zone_iteration_error(), and zone_iterator().

◆ found_private_rec

int found_private_rec = GNUNET_NO
static

Set to GNUNET_YES if private record was found;.

Definition at line 76 of file gnunet-gns-import.c.

Referenced by zone_iteration_error(), and zone_iterator().

◆ found_pin_rec

int found_pin_rec = GNUNET_NO
static

Set to GNUNET_YES if pin record was found;.

Definition at line 81 of file gnunet-gns-import.c.

Referenced by zone_iteration_error(), and zone_iterator().

◆ ret

int ret
static

Exit code.

Definition at line 86 of file gnunet-gns-import.c.

Referenced by get_ego(), main(), run(), run_process_and_wait(), and zone_iteration_error().