aboutsummaryrefslogtreecommitdiff
path: root/src/credential/credential_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/credential/credential_api.c')
-rw-r--r--src/credential/credential_api.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/credential/credential_api.c b/src/credential/credential_api.c
index 54a02484d..cae670206 100644
--- a/src/credential/credential_api.c
+++ b/src/credential/credential_api.c
@@ -30,6 +30,7 @@
30#include "gnunet_protocols.h" 30#include "gnunet_protocols.h"
31#include "gnunet_signatures.h" 31#include "gnunet_signatures.h"
32#include "credential.h" 32#include "credential.h"
33#include "credential_serialization.h"
33#include "gnunet_credential_service.h" 34#include "gnunet_credential_service.h"
34#include "gnunet_identity_service.h" 35#include "gnunet_identity_service.h"
35 36
@@ -213,6 +214,10 @@ handle_result (void *cls,
213 struct GNUNET_CREDENTIAL_Handle *handle = cls; 214 struct GNUNET_CREDENTIAL_Handle *handle = cls;
214 uint32_t r_id = ntohl (vr_msg->id); 215 uint32_t r_id = ntohl (vr_msg->id);
215 struct GNUNET_CREDENTIAL_Request *vr; 216 struct GNUNET_CREDENTIAL_Request *vr;
217 size_t mlen = ntohs (vr_msg->header.size) - sizeof (*vr_msg);
218 uint32_t d_count = ntohl (vr_msg->d_count);
219 struct GNUNET_CREDENTIAL_Delegation d_chain[d_count];
220 struct GNUNET_CREDENTIAL_Credential cred;
216 GNUNET_CREDENTIAL_VerifyResultProcessor proc; 221 GNUNET_CREDENTIAL_VerifyResultProcessor proc;
217 void *proc_cls; 222 void *proc_cls;
218 223
@@ -229,24 +234,23 @@ handle_result (void *cls,
229 handle->verify_tail, 234 handle->verify_tail,
230 vr); 235 vr);
231 GNUNET_free (vr); 236 GNUNET_free (vr);
232 /**
233 GNUNET_assert (GNUNET_OK == 237 GNUNET_assert (GNUNET_OK ==
234 GNUNET_CREDENTIAL_records_deserialize (mlen, 238 GNUNET_CREDENTIAL_delegation_chain_deserialize (mlen,
235 (const char*) &lookup_msg[1], 239 (const char*) &vr_msg[1],
236 rd_count, 240 d_count,
237 rd)); 241 d_chain,
238 */ 242 &cred));
239 if (GNUNET_NO == ntohl (vr_msg->cred_found)) 243 if (GNUNET_NO == ntohl (vr_msg->cred_found))
240 { 244 {
241 proc (proc_cls, 245 proc (proc_cls,
242 NULL,
243 0, 246 0,
247 NULL,
244 NULL); // TODO 248 NULL); // TODO
245 } else { 249 } else {
246 proc (proc_cls, 250 proc (proc_cls,
247 (struct GNUNET_CREDENTIAL_CredentialRecordData*) &vr_msg[1], 251 d_count,
248 0, 252 d_chain,
249 NULL); 253 &cred);
250 } 254 }
251} 255}
252 256