diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-05 21:34:22 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-05 21:34:22 +0100 |
commit | e2351f98490794db3e04c83106899781feb3edf2 (patch) | |
tree | 82413999d9b03cd079abb63f7b423be671c24392 /src/credential/credential_api.c | |
parent | ad04c24e83c23302b73b176f4d36603e7d8f1134 (diff) | |
download | gnunet-e2351f98490794db3e04c83106899781feb3edf2.tar.gz gnunet-e2351f98490794db3e04c83106899781feb3edf2.zip |
-fix verifymessage
Diffstat (limited to 'src/credential/credential_api.c')
-rw-r--r-- | src/credential/credential_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/credential/credential_api.c b/src/credential/credential_api.c index 344bb6e63..b6c585c72 100644 --- a/src/credential/credential_api.c +++ b/src/credential/credential_api.c | |||
@@ -378,7 +378,7 @@ GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle, | |||
378 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 378 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
379 | "Trying to verify `%s' in CREDENTIAL\n", | 379 | "Trying to verify `%s' in CREDENTIAL\n", |
380 | issuer_attribute); | 380 | issuer_attribute); |
381 | nlen = strlen (issuer_attribute) + 1 + strlen (subject_attribute) + 1; | 381 | nlen = strlen (issuer_attribute) + strlen (subject_attribute) + 1; |
382 | if (nlen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (*vr)) | 382 | if (nlen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (*vr)) |
383 | { | 383 | { |
384 | GNUNET_break (0); | 384 | GNUNET_break (0); |
@@ -395,10 +395,12 @@ GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle, | |||
395 | v_msg->id = htonl (vr->r_id); | 395 | v_msg->id = htonl (vr->r_id); |
396 | v_msg->subject_key = *subject_key; | 396 | v_msg->subject_key = *subject_key; |
397 | v_msg->issuer_key = *issuer_key; | 397 | v_msg->issuer_key = *issuer_key; |
398 | v_msg->issuer_attribute_len = htons(strlen(issuer_attribute)); | ||
399 | v_msg->subject_attribute_len = htons(strlen(subject_attribute)); | ||
398 | GNUNET_memcpy (&v_msg[1], | 400 | GNUNET_memcpy (&v_msg[1], |
399 | issuer_attribute, | 401 | issuer_attribute, |
400 | strlen (issuer_attribute)); | 402 | strlen (issuer_attribute)); |
401 | GNUNET_memcpy (((char*)&v_msg[1]) + strlen (issuer_attribute) + 1, | 403 | GNUNET_memcpy (((char*)&v_msg[1]) + strlen (issuer_attribute), |
402 | subject_attribute, | 404 | subject_attribute, |
403 | strlen (subject_attribute)); | 405 | strlen (subject_attribute)); |
404 | GNUNET_CONTAINER_DLL_insert (handle->verify_head, | 406 | GNUNET_CONTAINER_DLL_insert (handle->verify_head, |