Check-in [d76d28b9e9]
Overview
Comment:Fixed issue with signing wrong data
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d76d28b9e90d508a5d097b5db616a4efe3cbe8ef
User & Date: rkeene on 2010-05-20 17:58:59
Other Links: manifest | tags
Context
2010-05-20
18:30
Updated to use MAKE environment variable as make command, if present

Updated to autogen cackey check-in: 4688f0e933 user: rkeene tags: trunk

17:58
Fixed issue with signing wrong data check-in: d76d28b9e9 user: rkeene tags: trunk
2010-05-19
22:14
Updated to set SIGN_RECOVER attribute in all objects check-in: af6a31403e user: rkeene tags: trunk
Changes

Modified cackey.c from [24493cef2c] to [93de8e257c].

  5095   5095   		return(CKR_OPERATION_NOT_INITIALIZED);
  5096   5096   	}
  5097   5097   
  5098   5098   	switch (cackey_sessions[hSession].sign_mechanism) {
  5099   5099   		case CKM_RSA_PKCS:
  5100   5100   			/* Ask card to sign */
  5101   5101   			CACKEY_DEBUG_PRINTF("Asking to sign from identity %p in session %lu", cackey_sessions[hSession].sign_identity, (unsigned long) hSession);
  5102         -			sigbuflen = cackey_signdecrypt(&cackey_slots[cackey_sessions[hSession].slotID], cackey_sessions[hSession].sign_identity, cackey_sessions[hSession].sign_buf, cackey_sessions[hSession].sign_buflen, sigbuf, sizeof(sigbuf), 1, 0);
         5102  +			sigbuflen = cackey_signdecrypt(&cackey_slots[cackey_sessions[hSession].slotID], cackey_sessions[hSession].sign_identity, cackey_sessions[hSession].sign_buf, cackey_sessions[hSession].sign_bufused, sigbuf, sizeof(sigbuf), 1, 0);
  5103   5103   
  5104   5104   			if (sigbuflen < 0) {
  5105   5105   				/* Signing failed. */
  5106   5106   				retval = CKR_GENERAL_ERROR;
  5107   5107   			} else if (((unsigned long) sigbuflen) > *pulSignatureLen && pSignature) {
  5108   5108   				/* Signed data too large */
  5109   5109   				CACKEY_DEBUG_PRINTF("retval = CKR_BUFFER_TOO_SMALL;  sigbuflen = %lu, pulSignatureLen = %lu", (unsigned long) sigbuflen, (unsigned long) *pulSignatureLen);