Check-in [824ac1bc2e]
Overview
Comment:Updated debugging output
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 824ac1bc2ea8ddec48cfec55eef38982d1a16fef
User & Date: rkeene on 2010-05-17 23:11:31
Other Links: manifest | tags
Context
2010-05-18
14:11
Updated to keep track of required token flags check-in: 93bbed97eb user: rkeene tags: trunk
2010-05-17
23:11
Updated debugging output check-in: 824ac1bc2e user: rkeene tags: trunk
22:22
Updated to support unpadding check-in: ebeffd66b4 user: rkeene tags: trunk
Changes

Modified cackey.c from [b1f39a9840] to [806bbf2a79].

4990
4991
4992
4993
4994
4995
4996
4997

4998
4999
5000
5001
5002
5003
5004


5005
5006
5007
5008
5009
5010
5011
4990
4991
4992
4993
4994
4995
4996

4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013







-
+







+
+







		
		return(CKR_OPERATION_NOT_INITIALIZED);
	}

	switch (cackey_sessions[hSession].sign_mechanism) {
		case CKM_RSA_PKCS:
			/* Ask card to sign */
			CACKEY_DEBUG_PRINTF("Asking to decrypt from identity %p in session %lu", cackey_sessions[hSession].sign_identity, (unsigned long) hSession);
			CACKEY_DEBUG_PRINTF("Asking to sign from identity %p in session %lu", cackey_sessions[hSession].sign_identity, (unsigned long) hSession);
			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);

			if (sigbuflen < 0) {
				/* Signing failed. */
				retval = CKR_GENERAL_ERROR;
			} else if (((unsigned long) sigbuflen) > *pulSignatureLen && pSignature) {
				/* Signed data too large */
				CACKEY_DEBUG_PRINTF("retval = CKR_BUFFER_TOO_SMALL;  sigbuflen = %lu, pulSignatureLen = %lu", (unsigned long) sigbuflen, (unsigned long) *pulSignatureLen);

				retval = CKR_BUFFER_TOO_SMALL;

				terminate_sign = 0;
			} else {
				terminate_sign = 0;

				if (pSignature) {