diff options
author | Tristan Schwieren <tristan.schwieren@tum.de> | 2022-05-25 16:55:58 +0200 |
---|---|---|
committer | Tristan Schwieren <tristan.schwieren@tum.de> | 2022-05-25 16:55:58 +0200 |
commit | 9df46666fb7bf75fc833b2aaa5fee99425be3a19 (patch) | |
tree | 8037308d949c62d6fd09e6c8fd4f7f7e450c6438 /src/reclaim/gnunet-did.c | |
parent | a3af7211c33d6f54d3b72c37c1abe28dad89667f (diff) | |
download | gnunet-9df46666fb7bf75fc833b2aaa5fee99425be3a19.tar.gz gnunet-9df46666fb7bf75fc833b2aaa5fee99425be3a19.zip |
- not working test
Diffstat (limited to 'src/reclaim/gnunet-did.c')
-rw-r--r-- | src/reclaim/gnunet-did.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/reclaim/gnunet-did.c b/src/reclaim/gnunet-did.c index 637b403a9..435aad3fe 100644 --- a/src/reclaim/gnunet-did.c +++ b/src/reclaim/gnunet-did.c | |||
@@ -211,10 +211,10 @@ get_pkey_from_attr_did (struct GNUNET_IDENTITY_PublicKey *pkey) | |||
211 | */ | 211 | */ |
212 | char pkey_str[59]; | 212 | char pkey_str[59]; |
213 | 213 | ||
214 | if ((1 != (sscanf (did, GNUNET_DID_METHOD_PREFIX"%58s", pkey_str))) || | 214 | if ((1 != (sscanf (did, GNUNET_DID_METHOD_PREFIX "%58s", pkey_str))) || |
215 | (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (pkey_str, pkey))) | 215 | (GNUNET_OK != GNUNET_IDENTITY_public_key_from_string (pkey_str, pkey))) |
216 | { | 216 | { |
217 | fprintf (stderr, _("Invalid DID `%s'\n"), pkey_str); | 217 | fprintf (stderr, _ ("Invalid DID `%s'\n"), pkey_str); |
218 | GNUNET_SCHEDULER_add_now (cleanup, NULL); | 218 | GNUNET_SCHEDULER_add_now (cleanup, NULL); |
219 | ret = 1; | 219 | ret = 1; |
220 | return; | 220 | return; |
@@ -279,7 +279,8 @@ resolve_did_document () | |||
279 | 279 | ||
280 | get_pkey_from_attr_did (&pkey); | 280 | get_pkey_from_attr_did (&pkey); |
281 | 281 | ||
282 | GNUNET_GNS_lookup (gns_handle, GNUNET_GNS_EMPTY_LABEL_AT, &pkey, GNUNET_DNSPARSER_TYPE_TXT, | 282 | GNUNET_GNS_lookup (gns_handle, GNUNET_GNS_EMPTY_LABEL_AT, &pkey, |
283 | GNUNET_DNSPARSER_TYPE_TXT, | ||
283 | GNUNET_GNS_LO_DEFAULT, &print_did_document, NULL); | 284 | GNUNET_GNS_LO_DEFAULT, &print_did_document, NULL); |
284 | } | 285 | } |
285 | 286 | ||
@@ -328,7 +329,8 @@ remove_did_document_namestore_cb (void *cls, int32_t success, const char *emgs) | |||
328 | ret = 0; | 329 | ret = 0; |
329 | return; | 330 | return; |
330 | } | 331 | } |
331 | } else { | 332 | } |
333 | else { | ||
332 | printf ("Something went wrong when deleting the DID Document\n"); | 334 | printf ("Something went wrong when deleting the DID Document\n"); |
333 | 335 | ||
334 | if (emgs != NULL) | 336 | if (emgs != NULL) |
@@ -433,7 +435,7 @@ create_did_store (char *didd_str, struct GNUNET_IDENTITY_Ego *ego) | |||
433 | GNUNET_NAMESTORE_records_store (namestore_handle, | 435 | GNUNET_NAMESTORE_records_store (namestore_handle, |
434 | skey, | 436 | skey, |
435 | GNUNET_GNS_EMPTY_LABEL_AT, | 437 | GNUNET_GNS_EMPTY_LABEL_AT, |
436 | 1, //FIXME what if GNUNET_GNS_EMPTY_LABEL_AT has records | 438 | 1, // FIXME what if GNUNET_GNS_EMPTY_LABEL_AT has records |
437 | &record_data, | 439 | &record_data, |
438 | &create_did_store_cb, | 440 | &create_did_store_cb, |
439 | NULL); | 441 | NULL); |
@@ -642,7 +644,7 @@ process_dids (void *cls, struct GNUNET_IDENTITY_Ego *ego, | |||
642 | (0 == strncmp (name, egoname, strlen (egoname))) && | 644 | (0 == strncmp (name, egoname, strlen (egoname))) && |
643 | (1 != ego_exists)) | 645 | (1 != ego_exists)) |
644 | { | 646 | { |
645 | fprintf(stderr, "%s already exists!\n", egoname); | 647 | fprintf (stderr, "%s already exists!\n", egoname); |
646 | ego_exists = 1; | 648 | ego_exists = 1; |
647 | return; | 649 | return; |
648 | } | 650 | } |
@@ -761,8 +763,7 @@ main (int argc, char *const argv[]) | |||
761 | if (GNUNET_OK != GNUNET_PROGRAM_run (argc, | 763 | if (GNUNET_OK != GNUNET_PROGRAM_run (argc, |
762 | argv, | 764 | argv, |
763 | "gnunet-did", | 765 | "gnunet-did", |
764 | _ ( | 766 | "Manage Decentralized Identities (DIDs)", |
765 | "Manage Decentralized Identities (DIDs)"), | ||
766 | options, | 767 | options, |
767 | &run, | 768 | &run, |
768 | NULL)) | 769 | NULL)) |