summaryrefslogtreecommitdiff
path: root/src/credential/gnunet-credential.c
diff options
context:
space:
mode:
authorAndreas Ebner <pansy007@googlemail.com>2019-08-04 13:52:03 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-07 12:16:50 +0200
commit15b0d71a635f02f5e0291a695d35a65698fdea05 (patch)
tree5afc234a0ce848019d1098f3852fde06f14dcd98 /src/credential/gnunet-credential.c
parent93cd93a1330fb38add615f797ac9a87fc252ff98 (diff)
Clean up and renaming
- renamed a lot of variables/functions that no longer serve credential but delegate - correct printouts likewise - cleaned up test_credential_own.sh to use credential service issuer side storage - removed credential related parameters from VerifyRequestHandle struct
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r--src/credential/gnunet-credential.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c
index 64f5c5a5f..07148a1b5 100644
--- a/src/credential/gnunet-credential.c
+++ b/src/credential/gnunet-credential.c
@@ -254,17 +254,17 @@ handle_collect_result (void *cls,
unsigned int d_count,
struct GNUNET_CREDENTIAL_Delegation *dc,
unsigned int c_count,
- struct GNUNET_CREDENTIAL_Delegate *cred)
+ struct GNUNET_CREDENTIAL_Delegate *dele)
{
int i;
char *line;
verify_request = NULL;
- if (NULL != cred)
+ if (NULL != dele)
{
for (i = 0; i < c_count; i++)
{
- line = GNUNET_CREDENTIAL_delegate_to_string (&cred[i]);
+ line = GNUNET_CREDENTIAL_delegate_to_string (&dele[i]);
printf ("%s\n", line);
GNUNET_free (line);
}
@@ -272,7 +272,6 @@ handle_collect_result (void *cls,
printf("Received NULL\n");
}
-
GNUNET_SCHEDULER_shutdown ();
}
@@ -282,14 +281,14 @@ handle_verify_result (void *cls,
unsigned int d_count,
struct GNUNET_CREDENTIAL_Delegation *dc,
unsigned int c_count,
- struct GNUNET_CREDENTIAL_Delegate *cred)
+ struct GNUNET_CREDENTIAL_Delegate *dele)
{
int i;
char *iss_key;
char *sub_key;
verify_request = NULL;
- if (NULL == cred)
+ if (NULL == dele)
printf ("Failed.\n");
else
{
@@ -319,19 +318,18 @@ handle_verify_result (void *cls,
GNUNET_free (iss_key);
GNUNET_free (sub_key);
}
- printf ("\nCredentials:\n");
+ printf ("\nDelegate(s):\n");
for (i = 0; i < c_count; i++)
{
- iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&cred[i].issuer_key);
- sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&cred[i].subject_key);
- printf ("%s.%s <- %s\n", iss_key, cred[i].issuer_attribute, sub_key);
+ iss_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dele[i].issuer_key);
+ sub_key = GNUNET_CRYPTO_ecdsa_public_key_to_string (&dele[i].subject_key);
+ printf ("%s.%s <- %s\n", iss_key, dele[i].issuer_attribute, sub_key);
GNUNET_free (iss_key);
GNUNET_free (sub_key);
}
printf ("Successful.\n");
}
-
GNUNET_SCHEDULER_shutdown ();
}