From e2c4e9fc2ebc0c97c9bd8ef7e122c244390332fd Mon Sep 17 00:00:00 2001 From: Alessio Di Mauro Date: Mon, 24 Aug 2015 14:20:01 +0200 Subject: [PATCH] Use longer buffer to store the signature. --- ykcs11/ykcs11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykcs11/ykcs11.c b/ykcs11/ykcs11.c index b7d3be1..1fa0643 100644 --- a/ykcs11/ykcs11.c +++ b/ykcs11/ykcs11.c @@ -1435,7 +1435,7 @@ CK_DEFINE_FUNCTION(CK_RV, C_Sign)( if (pSignature == NULL_PTR) { // Just return the size of the signature - *pulSignatureLen = op_info.op.sign.key_len / 8; + *pulSignatureLen = op_info.op.sign.key_len / 8 * 2 + 32; // Approximate the size of the signature. Specs agree with this. DBG(("The size of the signature will be %lu", *pulSignatureLen)); DOUT;