aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Schwieren <tristan.schwieren@tum.de>2021-12-20 14:03:21 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2021-12-21 17:17:18 +0100
commit2730aad8769895945ca46e98f2289d00bdf20d2c (patch)
tree14c4c53957728c9422d131db898e13b941e987df
parentac07d007e4f27d440525954edd77c98b86c86e17 (diff)
downloadgnunet-2730aad8769895945ca46e98f2289d00bdf20d2c.tar.gz
gnunet-2730aad8769895945ca46e98f2289d00bdf20d2c.zip
-did not working key check
-rw-r--r--src/did/gnunet-did.c13
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,
555static void 552static void
556create_did_document() 553create_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,