Differences From Artifact [09dbb17ef5]:
- File
cackey.c
— part of check-in
[02f5cea2da]
at
2011-09-08 01:47:17
on branch trunk
— CACKey 0.6.2
Updated to include sha1.c, md5.c, and asn1-x509.c in the cackey.c translation unit so that these symbols never get exported and conflict with existing programs
Updated to try harder to remove and weaken symbols from shared object (user: rkeene, size: 176935) [annotate] [blame] [check-ins using]
To Artifact [498d154f21]:
- File cackey.c — part of check-in [b673394c9a] at 2012-02-12 06:26:11 on branch trunk — Stopped reporting CKM_SHA1_RSA_PKCS as a supported mechanism -- it was never actually supported (user: rkeene, size: 175916) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
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); } |
︙ | ︙ |