aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/revocation_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revocation/revocation_api.c')
-rw-r--r--src/revocation/revocation_api.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index d5bd53e56..8f05b88fd 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -410,7 +410,7 @@ check_signature_identity (const struct GNUNET_REVOCATION_PowP *pow,
410 const struct GNUNET_IDENTITY_PublicKey *key) 410 const struct GNUNET_IDENTITY_PublicKey *key)
411{ 411{
412 struct GNUNET_REVOCATION_SignaturePurposePS *spurp; 412 struct GNUNET_REVOCATION_SignaturePurposePS *spurp;
413 struct GNUNET_IDENTITY_Signature *sig; 413 unsigned char *sig;
414 const struct GNUNET_IDENTITY_PublicKey *pk; 414 const struct GNUNET_IDENTITY_PublicKey *pk;
415 size_t ksize; 415 size_t ksize;
416 416
@@ -427,12 +427,12 @@ check_signature_identity (const struct GNUNET_REVOCATION_PowP *pow,
427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
428 "Expected signature payload len: %u\n", 428 "Expected signature payload len: %u\n",
429 ntohl (spurp->purpose.size)); 429 ntohl (spurp->purpose.size));
430 sig = (struct GNUNET_IDENTITY_Signature *) ((char*) &pow[1] + ksize); 430 sig = ((unsigned char*) &pow[1] + ksize);
431 if (GNUNET_OK != 431 if (GNUNET_OK !=
432 GNUNET_IDENTITY_signature_verify_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION, 432 GNUNET_IDENTITY_signature_verify_raw_ (GNUNET_SIGNATURE_PURPOSE_REVOCATION,
433 &spurp->purpose, 433 &spurp->purpose,
434 sig, 434 sig,
435 key)) 435 key))
436 { 436 {
437 return GNUNET_SYSERR; 437 return GNUNET_SYSERR;
438 } 438 }
@@ -588,9 +588,9 @@ sign_pow_identity (const struct GNUNET_IDENTITY_PrivateKey *key,
588 ((char*) &rp[1]), 588 ((char*) &rp[1]),
589 ksize); 589 ksize);
590 sig = ((char*) &pow[1]) + ksize; 590 sig = ((char*) &pow[1]) + ksize;
591 int result = GNUNET_IDENTITY_sign_ (key, 591 int result = GNUNET_IDENTITY_sign_raw_ (key,
592 &rp->purpose, 592 &rp->purpose,
593 (void*) sig); 593 (void*) sig);
594 if (result == GNUNET_SYSERR) 594 if (result == GNUNET_SYSERR)
595 return GNUNET_NO; 595 return GNUNET_NO;
596 else 596 else
@@ -768,7 +768,7 @@ GNUNET_REVOCATION_proof_get_size (const struct GNUNET_REVOCATION_PowP *pow)
768 ksize = GNUNET_IDENTITY_key_get_length (pk); 768 ksize = GNUNET_IDENTITY_key_get_length (pk);
769 size += ksize; 769 size += ksize;
770 sig = (struct GNUNET_IDENTITY_Signature *) ((char*) &pow[1] + ksize); 770 sig = (struct GNUNET_IDENTITY_Signature *) ((char*) &pow[1] + ksize);
771 size += GNUNET_IDENTITY_signature_get_length (sig); 771 size += GNUNET_IDENTITY_signature_get_raw_length_by_type (pk->type);
772 return size; 772 return size;
773} 773}
774 774