YKCS11: more elaborate solution for stripping DER encoding from ECDSA signatures.

It is possible to receive different padding length for r and s, where their length
is [-1, 1] wrt the component lenght. Take this into account.
This commit is contained in:
Alessio Di Mauro
2015-11-12 03:07:35 +01:00
parent 89e02dc669
commit a853902bcb
2 changed files with 45 additions and 10 deletions
+3
View File
@@ -1783,6 +1783,9 @@ CK_DEFINE_FUNCTION(CK_RV, C_Sign)(
return CKR_OK;
}
fprintf(stderr, "MI HAI DATO %lu!!!!!!!!!!!!!!!!!!!!!\n", *pulSignatureLen);
DBG("Sending %lu bytes to sign", ulDataLen);
#if YKCS11_DBG == 1
dump_hex(pData, ulDataLen, stderr, CK_TRUE);