[Cryptech-Commits] [sw/pkcs11] 10/14: Fix size_t vs CK_ULONG type mismatch (platform dependent).

git at cryptech.is git at cryptech.is
Mon Sep 14 21:44:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch ecdsa
in repository sw/pkcs11.

commit 04cb1eb4b963fab3d87f6d3f128c5fe745fd3963
Author: Rob Austein <sra at hactrn.net>
Date:   Fri Sep 11 15:44:30 2015 -0400

    Fix size_t vs CK_ULONG type mismatch (platform dependent).
---
 pkcs11.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkcs11.c b/pkcs11.c
index 914607e..88ad883 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -2405,10 +2405,12 @@ static CK_RV sign_ecdsa(p11_session_t *session,
   }
 
   if (pSignature != NULL && !hal_check(hal_ecdsa_sign(key, pData, ulDataLen,
-                                                      pSignature, pulSignatureLen, *pulSignatureLen,
+                                                      pSignature, &signature_len, *pulSignatureLen,
                                                       HAL_ECDSA_SIGNATURE_FORMAT_PKCS11)))
     lose(CKR_FUNCTION_FAILED);
 
+  assert(signature_len == *pulSignatureLen);
+
   rv = CKR_OK;                  /* Fall through */
 
  fail:



More information about the Commits mailing list