diff options
Diffstat (limited to 'src/did/gnunet-did.c')
-rw-r--r-- | src/did/gnunet-did.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/did/gnunet-did.c b/src/did/gnunet-did.c index aa1a9188f..ad88bcaf6 100644 --- a/src/did/gnunet-did.c +++ b/src/did/gnunet-did.c | |||
@@ -488,13 +488,10 @@ create_did_ego_lockup_cb(void *cls, struct GNUNET_IDENTITY_Ego * ego) | |||
488 | 488 | ||
489 | GNUNET_IDENTITY_ego_get_public_key(ego, &pkey); | 489 | GNUNET_IDENTITY_ego_get_public_key(ego, &pkey); |
490 | 490 | ||
491 | printf("DEBUG: Key type: %d\n", pkey.type); | 491 | printf("DEBUG: Key type: %ld\n", (unsigned long) pkey.type); |
492 | 492 | ||
493 | // check if the key is of right type (EDDSA) | 493 | // if (false) |
494 | 494 | if (pkey.type != GNUNET_GNSRECORD_TYPE_EDKEY) | |
495 | // What does "Defined by the GNS zone type value in NBO" mean? | ||
496 | //if (pkey.type != GNUNET_IDENTITY_TYPE_EDDSA) { | ||
497 | if (false) | ||
498 | { | 495 | { |
499 | printf("The EGO has to have an EDDSA key pair\n"); | 496 | printf("The EGO has to have an EDDSA key pair\n"); |
500 | GNUNET_SCHEDULER_add_now(&cleanup, NULL); | 497 | GNUNET_SCHEDULER_add_now(&cleanup, NULL); |
@@ -555,14 +552,14 @@ create_did_document_ego_create_cb(void *cls, | |||
555 | static void | 552 | static void |
556 | create_did_document() | 553 | create_did_document() |
557 | { | 554 | { |
558 | if(attr_name != NULL || attr_expire != NULL){ | 555 | if(attr_name != NULL && attr_expire != NULL){ |
559 | GNUNET_IDENTITY_create(identity_handle, | 556 | GNUNET_IDENTITY_create(identity_handle, |
560 | attr_name, | 557 | attr_name, |
561 | NULL, | 558 | NULL, |
562 | GNUNET_IDENTITY_TYPE_EDDSA, | 559 | GNUNET_IDENTITY_TYPE_EDDSA, |
563 | &create_did_document_ego_create_cb, | 560 | &create_did_document_ego_create_cb, |
564 | (void *) attr_name); | 561 | (void *) attr_name); |
565 | } else if (attr_ego != NULL || attr_expire != NULL) { | 562 | } else if (attr_ego != NULL && attr_expire != NULL) { |
566 | GNUNET_IDENTITY_ego_lookup(my_cfg, | 563 | GNUNET_IDENTITY_ego_lookup(my_cfg, |
567 | attr_ego, | 564 | attr_ego, |
568 | &create_did_ego_lockup_cb, | 565 | &create_did_ego_lockup_cb, |