aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkcs11.c4
1 files changed, 3 insertions, 1 deletions
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: