gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 20/70: -did not working key check


From: gnunet
Subject: [gnunet] 20/70: -did not working key check
Date: Wed, 31 Aug 2022 18:00:14 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 7779d8b9d8b2e8cb91811326943d570e563acbca
Author: Tristan Schwieren <tristan.schwieren@tum.de>
AuthorDate: Mon Dec 20 14:03:21 2021 +0100

    -did not working key check
---
 src/did/gnunet-did.c | 13 +++++--------
 1 file 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)
 
   GNUNET_IDENTITY_ego_get_public_key(ego, &pkey);
 
-       printf("DEBUG: Key type: %d\n", pkey.type);
+       printf("DEBUG: Key type: %ld\n", (unsigned long) pkey.type);
 
-       // check if the key is of right type (EDDSA)
-
-       // What does "Defined by the GNS zone type value in NBO" mean?
-       //if (pkey.type != GNUNET_IDENTITY_TYPE_EDDSA) {
-       if (false) 
+       // if (false)
+       if (pkey.type != GNUNET_GNSRECORD_TYPE_EDKEY)
        {
                printf("The EGO has to have an EDDSA key pair\n");
                GNUNET_SCHEDULER_add_now(&cleanup, NULL);
@@ -555,14 +552,14 @@ create_did_document_ego_create_cb(void *cls,
 static void 
 create_did_document()
 {
-       if(attr_name != NULL || attr_expire != NULL){
+       if(attr_name != NULL && attr_expire != NULL){
                GNUNET_IDENTITY_create(identity_handle,
                                                                                
                         attr_name,
                                                                                
                         NULL,
                                                                                
                         GNUNET_IDENTITY_TYPE_EDDSA,
                                                                                
                         &create_did_document_ego_create_cb,
                                                                                
                         (void *) attr_name);
-       } else if (attr_ego != NULL || attr_expire != NULL) {
+       } else if (attr_ego != NULL && attr_expire != NULL) {
                GNUNET_IDENTITY_ego_lookup(my_cfg,
                                           attr_ego,
                                           &create_did_ego_lockup_cb,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]