Overview
| Comment: | Stopped reporting CKM_SHA1_RSA_PKCS as a supported mechanism -- it was never actually supported | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | b673394c9af304dfa3745aaf2699fa3c | 
| User & Date: | rkeene on 2012-02-12 06:26:11 | 
| Other Links: | manifest | tags | 
Context
| 2012-04-21 | ||
| 01:13 | Fixed issue with C_GetMechanismList reporting wrong number of mechanisms when asked check-in: 66ea8c8073 user: rkeene tags: trunk | |
| 2012-02-12 | ||
| 06:26 | Stopped reporting CKM_SHA1_RSA_PKCS as a supported mechanism -- it was never actually supported check-in: b673394c9a user: rkeene tags: trunk | |
| 2011-12-22 | ||
| 19:11 | Updated to check for more tools when trying to strip check-in: 780725ae48 user: rkeene tags: trunk | |
Changes
Modified cackey.c from [09dbb17ef5] to [498d154f21].
| ︙ | ︙ | |||
| 3856 3857 3858 3859 3860 3861 3862 | 
	if (*pulCount < 2) {
		CACKEY_DEBUG_PRINTF("Error.  Buffer too small.");
		return(CKR_BUFFER_TOO_SMALL);
	}
	pMechanismList[0] = CKM_RSA_PKCS;
 | < | | 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 | 
	if (*pulCount < 2) {
		CACKEY_DEBUG_PRINTF("Error.  Buffer too small.");
		return(CKR_BUFFER_TOO_SMALL);
	}
	pMechanismList[0] = CKM_RSA_PKCS;
	*pulCount = 1;
	CACKEY_DEBUG_PRINTF("Returning CKR_OK (%i)", CKR_OK);
	return(CKR_OK);
}
CK_DEFINE_FUNCTION(CK_RV, C_GetMechanismInfo)(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO_PTR pInfo) {
 | 
| ︙ | ︙ | |||
| 3909 3910 3911 3912 3913 3914 3915 | 
	mutex_retval = cackey_mutex_unlock(cackey_biglock);
	if (mutex_retval != 0) {
		CACKEY_DEBUG_PRINTF("Error.  Unlocking failed.");
		return(CKR_GENERAL_ERROR);
	}
 | < < < < < < < < < < < | 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 | 
	mutex_retval = cackey_mutex_unlock(cackey_biglock);
	if (mutex_retval != 0) {
		CACKEY_DEBUG_PRINTF("Error.  Unlocking failed.");
		return(CKR_GENERAL_ERROR);
	}
	switch (type) {
		case CKM_RSA_PKCS:
			pInfo->ulMinKeySize = 512;
			pInfo->ulMaxKeySize = 8192;
			pInfo->flags = CKF_HW | CKF_ENCRYPT | CKF_DECRYPT | CKF_SIGN | CKF_VERIFY;
			break;
	}
	CACKEY_DEBUG_PRINTF("Returning CKR_OK (%i)", CKR_OK);
	return(CKR_OK);
}
 | 
| ︙ | ︙ | |||
| 5516 5517 5518 5519 5520 5521 5522 | 
	if (pMechanism == NULL) {
		CACKEY_DEBUG_PRINTF("Error. pMechanism is NULL.");
		return(CKR_ARGUMENTS_BAD);
	}
 | | | | 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 | 
	if (pMechanism == NULL) {
		CACKEY_DEBUG_PRINTF("Error. pMechanism is NULL.");
		return(CKR_ARGUMENTS_BAD);
	}
	if (pMechanism->mechanism != CKM_RSA_PKCS) {
		CACKEY_DEBUG_PRINTF("Error. pMechanism->mechanism not specified as CKM_RSA_PKCS");
		return(CKR_MECHANISM_PARAM_INVALID);
	}
	if (hSession == 0 || hSession >= (sizeof(cackey_sessions) / sizeof(cackey_sessions[0]))) {
		CACKEY_DEBUG_PRINTF("Error.  Session out of range.");
		
 | 
| ︙ | ︙ | |||
| 5745 5746 5747 5748 5749 5750 5751 | } memcpy(cackey_sessions[hSession].sign_buf + cackey_sessions[hSession].sign_bufused, pPart, ulPartLen); cackey_sessions[hSession].sign_bufused += ulPartLen; break; | < < < < < < < < | 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 | 
			}
			memcpy(cackey_sessions[hSession].sign_buf + cackey_sessions[hSession].sign_bufused, pPart, ulPartLen);
			cackey_sessions[hSession].sign_bufused += ulPartLen;
			break;
	}
	mutex_retval = cackey_mutex_unlock(cackey_biglock);
	if (mutex_retval != 0) {
		CACKEY_DEBUG_PRINTF("Error.  Unlocking failed.");
		return(CKR_GENERAL_ERROR);
 | 
| ︙ | ︙ | |||
| 5871 5872 5873 5874 5875 5876 5877 | *pulSignatureLen = sigbuflen; retval = CKR_OK; } break; | < < < < < < < < | 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 | 
				*pulSignatureLen = sigbuflen;
				retval = CKR_OK;
			}
			break;
	}
	if (terminate_sign) {
		if (cackey_sessions[hSession].sign_buf) {
			free(cackey_sessions[hSession].sign_buf);
		}
 | 
| ︙ | ︙ |