summaryrefslogtreecommitdiff
path: root/src/credential/gnunet-credential.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/credential/gnunet-credential.c')
-rw-r--r--src/credential/gnunet-credential.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/credential/gnunet-credential.c b/src/credential/gnunet-credential.c
index 55a4653fb..64f5c5a5f 100644
--- a/src/credential/gnunet-credential.c
+++ b/src/credential/gnunet-credential.c
@@ -254,7 +254,7 @@ handle_collect_result (void *cls,
254 unsigned int d_count, 254 unsigned int d_count,
255 struct GNUNET_CREDENTIAL_Delegation *dc, 255 struct GNUNET_CREDENTIAL_Delegation *dc,
256 unsigned int c_count, 256 unsigned int c_count,
257 struct GNUNET_CREDENTIAL_Credential *cred) 257 struct GNUNET_CREDENTIAL_Delegate *cred)
258{ 258{
259 int i; 259 int i;
260 char *line; 260 char *line;
@@ -264,10 +264,12 @@ handle_collect_result (void *cls,
264 { 264 {
265 for (i = 0; i < c_count; i++) 265 for (i = 0; i < c_count; i++)
266 { 266 {
267 line = GNUNET_CREDENTIAL_credential_to_string (&cred[i]); 267 line = GNUNET_CREDENTIAL_delegate_to_string (&cred[i]);
268 printf ("%s\n", line); 268 printf ("%s\n", line);
269 GNUNET_free (line); 269 GNUNET_free (line);
270 } 270 }
271 } else {
272 printf("Received NULL\n");
271 } 273 }
272 274
273 275
@@ -280,7 +282,7 @@ handle_verify_result (void *cls,
280 unsigned int d_count, 282 unsigned int d_count,
281 struct GNUNET_CREDENTIAL_Delegation *dc, 283 struct GNUNET_CREDENTIAL_Delegation *dc,
282 unsigned int c_count, 284 unsigned int c_count,
283 struct GNUNET_CREDENTIAL_Credential *cred) 285 struct GNUNET_CREDENTIAL_Delegate *cred)
284{ 286{
285 int i; 287 int i;
286 char *iss_key; 288 char *iss_key;
@@ -886,17 +888,17 @@ run (void *cls,
886 int i; 888 int i;
887 while (NULL != (tok = strtok (NULL, ","))) 889 while (NULL != (tok = strtok (NULL, ",")))
888 count++; 890 count++;
889 struct GNUNET_CREDENTIAL_Credential credentials[count]; 891 struct GNUNET_CREDENTIAL_Delegate credentials[count];
890 struct GNUNET_CREDENTIAL_Credential *cred; 892 struct GNUNET_CREDENTIAL_Delegate *cred;
891 GNUNET_free (tmp); 893 GNUNET_free (tmp);
892 tmp = GNUNET_strdup (subject_credential); 894 tmp = GNUNET_strdup (subject_credential);
893 tok = strtok (tmp, ","); 895 tok = strtok (tmp, ",");
894 for (i = 0; i < count; i++) 896 for (i = 0; i < count; i++)
895 { 897 {
896 cred = GNUNET_CREDENTIAL_credential_from_string (tok); 898 cred = GNUNET_CREDENTIAL_delegate_from_string (tok);
897 GNUNET_memcpy (&credentials[i], 899 GNUNET_memcpy (&credentials[i],
898 cred, 900 cred,
899 sizeof (struct GNUNET_CREDENTIAL_Credential)); 901 sizeof (struct GNUNET_CREDENTIAL_Delegate));
900 credentials[i].issuer_attribute = GNUNET_strdup (cred->issuer_attribute); 902 credentials[i].issuer_attribute = GNUNET_strdup (cred->issuer_attribute);
901 tok = strtok (NULL, ","); 903 tok = strtok (NULL, ",");
902 GNUNET_free (cred); 904 GNUNET_free (cred);