/titanic_50/usr/src/lib/pkcs11/libpkcs11/common/ |
H A D | pkcs11Keys.c | 42 C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_GenerateKey() argument 52 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_GenerateKey() 55 return (fast_funcs->C_GenerateKey(hSession, pMechanism, in C_GenerateKey() 73 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_GenerateKey() 79 pMechanism, pTemplate, ulCount, phKey); in C_GenerateKey() 97 C_GenerateKeyPair(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_GenerateKeyPair() argument 110 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_GenerateKeyPair() 113 return (fast_funcs->C_GenerateKeyPair(hSession, pMechanism, in C_GenerateKeyPair() 133 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_GenerateKeyPair() 139 pMechanism, pPublicKeyTemplate, ulPublicKeyAttributeCount, in C_GenerateKeyPair() [all …]
|
H A D | metaUtil.c | 38 CK_MECHANISM *pMechanism, meta_object_t *key) in meta_operation_init_defer() argument 46 (void) memcpy(session->init.pMech, pMechanism, in meta_operation_init_defer() 49 if ((pMechanism->ulParameterLen > 0) && in meta_operation_init_defer() 50 (pMechanism->pParameter != NULL)) { in meta_operation_init_defer() 52 malloc(pMechanism->ulParameterLen); in meta_operation_init_defer() 59 pMechanism->pParameter, pMechanism->ulParameterLen); in meta_operation_init_defer() 64 if ((pMechanism->ulParameterLen > 0) && in meta_operation_init_defer() 65 (pMechanism->pParameter != NULL)) { in meta_operation_init_defer() 66 if (pMechanism->ulParameterLen != in meta_operation_init_defer() 71 malloc(pMechanism->ulParameterLen); in meta_operation_init_defer() [all …]
|
H A D | pkcs11Sign.c | 43 C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_SignInit() argument 54 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_SignInit() 57 return (fast_funcs->C_SignInit(hSession, pMechanism, hKey)); in C_SignInit() 74 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_SignInit() 80 pMechanism, hKey); in C_SignInit() 221 C_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_SignRecoverInit() argument 231 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_SignRecoverInit() 234 return (fast_funcs->C_SignRecoverInit(hSession, pMechanism, in C_SignRecoverInit() 252 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_SignRecoverInit() 258 pMechanism, hKey); in C_SignRecoverInit()
|
H A D | pkcs11Verify.c | 43 C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_VerifyInit() argument 53 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_VerifyInit() 56 return (fast_funcs->C_VerifyInit(hSession, pMechanism, hKey)); in C_VerifyInit() 73 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_VerifyInit() 79 pMechanism, hKey); in C_VerifyInit() 219 C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_VerifyRecoverInit() argument 229 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_VerifyRecoverInit() 232 return (fast_funcs->C_VerifyRecoverInit(hSession, pMechanism, in C_VerifyRecoverInit() 250 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_VerifyRecoverInit() 256 pMechanism, hKey); in C_VerifyRecoverInit()
|
H A D | metaKeys.c | 39 meta_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_GenerateKey() argument 46 if (pMechanism == NULL || phKey == NULL) in meta_GenerateKey() 58 rv = meta_generate_keys(session, pMechanism, pTemplate, ulCount, key, in meta_GenerateKey() 84 meta_GenerateKeyPair(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_GenerateKeyPair() argument 93 if (pMechanism == NULL || phPublicKey == NULL || phPrivateKey == NULL) in meta_GenerateKeyPair() 109 rv = meta_generate_keys(session, pMechanism, in meta_GenerateKeyPair() 140 meta_WrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_WrapKey() argument 148 if (pMechanism == NULL || pulWrappedKeyLen == NULL) in meta_WrapKey() 168 rv = meta_wrap_key(session, pMechanism, wrappingKey, in meta_WrapKey() 185 meta_UnwrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_UnwrapKey() argument [all …]
|
H A D | pkcs11Crypt.c | 45 CK_MECHANISM_PTR pMechanism, in C_EncryptInit() argument 55 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_EncryptInit() 58 return (fast_funcs->C_EncryptInit(hSession, pMechanism, hKey)); in C_EncryptInit() 75 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_EncryptInit() 81 pMechanism, hKey); in C_EncryptInit() 228 CK_MECHANISM_PTR pMechanism, in C_DecryptInit() argument 238 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_DecryptInit() 241 return (fast_funcs->C_DecryptInit(hSession, pMechanism, hKey)); in C_DecryptInit() 258 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_DecryptInit() 264 pMechanism, hKey); in C_DecryptInit()
|
H A D | metaSign.c | 41 meta_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_SignInit() argument 48 if (pMechanism == NULL) in meta_SignInit() 61 rv = meta_operation_init(CKF_SIGN, session, pMechanism, key); in meta_SignInit() 165 meta_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_SignRecoverInit() argument 172 if (pMechanism == NULL) in meta_SignRecoverInit() 185 rv = meta_operation_init(CKF_SIGN_RECOVER, session, pMechanism, key); in meta_SignRecoverInit()
|
H A D | metaVerify.c | 41 meta_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_VerifyInit() argument 48 if (pMechanism == NULL) in meta_VerifyInit() 61 rv = meta_operation_init(CKF_VERIFY, session, pMechanism, key); in meta_VerifyInit() 170 meta_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_VerifyRecoverInit() argument 177 if (pMechanism == NULL) in meta_VerifyRecoverInit() 190 rv = meta_operation_init(CKF_VERIFY_RECOVER, session, pMechanism, key); in meta_VerifyRecoverInit()
|
H A D | pkcs11Digest.c | 43 C_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism) in C_DigestInit() argument 53 pkcs11_is_dismech(fast_slot, pMechanism->mechanism)) { in C_DigestInit() 56 return (fast_funcs->C_DigestInit(hSession, pMechanism)); in C_DigestInit() 73 if (pkcs11_is_dismech(slotid, pMechanism->mechanism)) { in C_DigestInit() 79 pMechanism); in C_DigestInit()
|
H A D | metaCrypt.c | 41 meta_EncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_EncryptInit() argument 48 if (pMechanism == NULL) in meta_EncryptInit() 61 rv = meta_operation_init_defer(CKF_ENCRYPT, session, pMechanism, key); in meta_EncryptInit() 167 meta_DecryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in meta_DecryptInit() argument 174 if (pMechanism == NULL) in meta_DecryptInit() 187 rv = meta_operation_init_defer(CKF_DECRYPT, session, pMechanism, key); in meta_DecryptInit()
|
H A D | metaGlobal.h | 586 CK_MECHANISM *pMechanism, meta_object_t *key); 588 CK_MECHANISM *pMechanism, meta_object_t *key); 596 CK_RV meta_generate_keys(meta_session_t *session, CK_MECHANISM *pMechanism, 601 CK_MECHANISM *pMechanism, meta_object_t *wrappingkey, 606 CK_MECHANISM *pMechanism, meta_object_t *unwrapping_key, 750 CK_RV meta_EncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, 760 CK_RV meta_DecryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, 770 CK_RV meta_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism); 778 CK_RV meta_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, 788 CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey); [all …]
|
/titanic_50/usr/src/lib/pkcs11/pkcs11_softtoken/common/ |
H A D | softKeys.c | 34 C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_GenerateKey() argument 50 if ((pMechanism == NULL) || (phKey == NULL)) { in C_GenerateKey() 60 rv = soft_genkey(session_p, pMechanism, pTemplate, in C_GenerateKey() 71 C_GenerateKeyPair(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_GenerateKeyPair() argument 89 if ((pMechanism == NULL) || (phPublicKey == NULL) || in C_GenerateKeyPair() 107 rv = soft_genkey_pair(session_p, pMechanism, pPublicKeyTemplate, in C_GenerateKeyPair() 117 C_WrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_WrapKey() argument 135 if (pMechanism == NULL) { in C_WrapKey() 196 rv = soft_wrapkey(session_p, pMechanism, wrappingkey_p, in C_WrapKey() 218 C_UnwrapKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_UnwrapKey() argument [all …]
|
H A D | softDecryptUtil.c | 82 soft_decrypt_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_decrypt_init() argument 88 switch (pMechanism->mechanism) { in soft_decrypt_init() 107 return (soft_des_crypt_init_common(session_p, pMechanism, in soft_decrypt_init() 130 if ((pMechanism->pParameter == NULL) || in soft_decrypt_init() 131 (pMechanism->ulParameterLen != DES_BLOCK_LEN)) { in soft_decrypt_init() 135 rv = soft_des_crypt_init_common(session_p, pMechanism, in soft_decrypt_init() 145 (void) memcpy(soft_des_ctx->ivec, pMechanism->pParameter, in soft_decrypt_init() 173 return (soft_aes_crypt_init_common(session_p, pMechanism, in soft_decrypt_init() 185 if ((pMechanism->pParameter == NULL) || in soft_decrypt_init() 186 (pMechanism->ulParameterLen != AES_BLOCK_LEN)) { in soft_decrypt_init() [all …]
|
H A D | softEncryptUtil.c | 58 pMechanism, soft_object_t *key_p) in soft_encrypt_init_internal() 74 rv = soft_encrypt_init(session_p, pMechanism, key_p); in soft_encrypt_init_internal() 106 soft_encrypt_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_encrypt_init() argument 112 switch (pMechanism->mechanism) { in soft_encrypt_init() 129 return (soft_des_crypt_init_common(session_p, pMechanism, in soft_encrypt_init() 153 if ((pMechanism->pParameter == NULL) || in soft_encrypt_init() 154 (pMechanism->ulParameterLen != DES_BLOCK_LEN)) { in soft_encrypt_init() 158 rv = soft_des_crypt_init_common(session_p, pMechanism, in soft_encrypt_init() 168 (void) memcpy(soft_des_ctx->ivec, pMechanism->pParameter, in soft_encrypt_init() 195 return (soft_aes_crypt_init_common(session_p, pMechanism, in soft_encrypt_init() [all …]
|
H A D | softKeysUtil.c | 153 soft_genkey(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_genkey() argument 167 switch (pMechanism->mechanism) { in soft_genkey() 194 if (pMechanism->pParameter == NULL || in soft_genkey() 195 pMechanism->ulParameterLen != sizeof (CK_VERSION)) in soft_genkey() 217 if (pMechanism->pParameter == NULL || in soft_genkey() 218 pMechanism->ulParameterLen != in soft_genkey() 250 if (pMechanism->pParameter == NULL || in soft_genkey() 251 pMechanism->ulParameterLen != in soft_genkey() 270 switch (pMechanism->mechanism) { in soft_genkey() 337 switch (pMechanism->mechanism) { in soft_genkey() [all …]
|
H A D | softVerifyUtil.c | 56 soft_verify_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_verify_init() argument 60 switch (pMechanism->mechanism) { in soft_verify_init() 76 pMechanism, key_p, B_FALSE)); in soft_verify_init() 86 return (soft_rsa_sign_verify_init_common(session_p, pMechanism, in soft_verify_init() 92 return (soft_dsa_sign_verify_init_common(session_p, pMechanism, in soft_verify_init() 98 return (soft_ecc_sign_verify_init_common(session_p, pMechanism, in soft_verify_init() 104 return (soft_des_sign_verify_init_common(session_p, pMechanism, in soft_verify_init() 420 soft_verify_recover_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_verify_recover_init() argument 424 switch (pMechanism->mechanism) { in soft_verify_recover_init() 429 return (soft_rsa_sign_verify_init_common(session_p, pMechanism, in soft_verify_recover_init()
|
H A D | softMAC.c | 69 CK_MECHANISM_PTR pMechanism, soft_object_t *key_p, boolean_t sign_op) in soft_hmac_sign_verify_init_common() argument 86 switch (pMechanism->mechanism) { in soft_hmac_sign_verify_init_common() 109 if ((pMechanism->ulParameterLen != in soft_hmac_sign_verify_init_common() 111 (*(CK_MAC_GENERAL_PARAMS *)pMechanism->pParameter > in soft_hmac_sign_verify_init_common() 117 pMechanism->pParameter); in soft_hmac_sign_verify_init_common() 122 if ((pMechanism->ulParameterLen != in soft_hmac_sign_verify_init_common() 124 (*(CK_MAC_GENERAL_PARAMS *)pMechanism->pParameter > in soft_hmac_sign_verify_init_common() 130 pMechanism->pParameter); in soft_hmac_sign_verify_init_common() 134 if ((pMechanism->ulParameterLen != in soft_hmac_sign_verify_init_common() 136 (*(CK_MAC_GENERAL_PARAMS *)pMechanism->pParameter > in soft_hmac_sign_verify_init_common() [all …]
|
H A D | softSignUtil.c | 55 soft_sign_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_sign_init() argument 59 switch (pMechanism->mechanism) { in soft_sign_init() 75 pMechanism, key_p, B_TRUE)); in soft_sign_init() 85 return (soft_rsa_sign_verify_init_common(session_p, pMechanism, in soft_sign_init() 91 return (soft_dsa_sign_verify_init_common(session_p, pMechanism, in soft_sign_init() 97 return (soft_ecc_sign_verify_init_common(session_p, pMechanism, in soft_sign_init() 103 return (soft_des_sign_verify_init_common(session_p, pMechanism, in soft_sign_init() 397 soft_sign_recover_init(soft_session_t *session_p, CK_MECHANISM_PTR pMechanism, in soft_sign_recover_init() argument 401 switch (pMechanism->mechanism) { in soft_sign_recover_init() 406 return (soft_rsa_sign_verify_init_common(session_p, pMechanism, in soft_sign_recover_init()
|
/titanic_50/usr/src/lib/pkcs11/include/ |
H A D | pkcs11f.h | 377 CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */ 427 CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */ 480 CK_MECHANISM_PTR pMechanism /* the digesting mechanism */ 545 CK_MECHANISM_PTR pMechanism, /* the signature mechanism */ 597 CK_MECHANISM_PTR pMechanism, /* the signature mechanism */ 627 CK_MECHANISM_PTR pMechanism, /* the verification mechanism */ 679 CK_MECHANISM_PTR pMechanism, /* the verification mechanism */ 767 CK_MECHANISM_PTR pMechanism, /* key generation mech. */ 782 CK_MECHANISM_PTR pMechanism, /* key-gen 809 CK_MECHANISM_PTR pMechanism, /* the wrapping mechanism */ [all …]
|
/titanic_50/usr/src/lib/pkcs11/pkcs11_tpm/common/ |
H A D | api_interface.c | 637 CK_MECHANISM_PTR pMechanism, in C_DecryptInit() argument 649 if (! pMechanism) { in C_DecryptInit() 653 rv = FuncList.ST_DecryptInit(rSession, pMechanism, hKey); in C_DecryptInit() 722 CK_MECHANISM_PTR pMechanism, in C_DeriveKey() argument 738 if (!pMechanism) { in C_DeriveKey() 745 rv = FuncList.ST_DeriveKey(rSession, pMechanism, in C_DeriveKey() 854 CK_MECHANISM_PTR pMechanism) in C_DigestInit() argument 862 if (! pMechanism) { in C_DigestInit() 869 rv = FuncList.ST_DigestInit(rSession, pMechanism); in C_DigestInit() 970 CK_MECHANISM_PTR pMechanism, in C_EncryptInit() argument [all …]
|
H A D | new_host.c | 95 validate_mechanism(CK_MECHANISM_PTR pMechanism) in validate_mechanism() argument 100 if (pMechanism->mechanism == mech_list[i].mech_type) { in validate_mechanism() 1182 CK_MECHANISM_PTR pMechanism, in SC_EncryptInit() argument 1194 if (! pMechanism) { in SC_EncryptInit() 1199 VALID_MECH(pMechanism); in SC_EncryptInit() 1219 pMechanism, hKey); in SC_EncryptInit() 1365 CK_MECHANISM_PTR pMechanism, in SC_DecryptInit() argument 1377 if (! pMechanism) { in SC_DecryptInit() 1381 VALID_MECH(pMechanism); in SC_DecryptInit() 1401 OP_DECRYPT_INIT, pMechanism, hKey); in SC_DecryptInit() [all …]
|
/titanic_50/usr/src/lib/pkcs11/pkcs11_kernel/common/ |
H A D | kernelKeys.c | 142 get_key_len_from_template(CK_MECHANISM_PTR pMechanism, in get_key_len_from_template() argument 187 if (pMechanism->mechanism == CKM_DH_PKCS_DERIVE) { in get_key_len_from_template() 198 } else if (pMechanism->mechanism == CKM_ECDH1_DERIVE) { in get_key_len_from_template() 247 key_gen_by_value(CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pTemplate, in key_gen_by_value() argument 263 rv = get_key_len_from_template(pMechanism, pTemplate, ulCount, in key_gen_by_value() 307 obj_ngk.ngk_mechanism.cm_param = pMechanism->pParameter; in key_gen_by_value() 308 obj_ngk.ngk_mechanism.cm_param_len = pMechanism->ulParameterLen; in key_gen_by_value() 365 C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_GenerateKey() argument 386 if ((pMechanism == NULL) || (phKey == NULL)) { in C_GenerateKey() 397 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in C_GenerateKey() [all …]
|
H A D | kernelDigest.c | 37 CK_MECHANISM_PTR pMechanism, boolean_t is_external_caller) in common_digest_init() argument 49 if (pMechanism == NULL) in common_digest_init() 55 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in common_digest_init() 79 session_p->digest.mech.mechanism = pMechanism->mechanism; in common_digest_init() 92 digest_init.di_mech.cm_param = pMechanism->pParameter; in common_digest_init() 98 if (pMechanism->pParameter != NULL) in common_digest_init() 99 digest_init.di_mech.cm_param_len = pMechanism->ulParameterLen; in common_digest_init() 135 C_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism) in C_DigestInit() argument 137 return (common_digest_init(hSession, pMechanism, B_TRUE)); in C_DigestInit() 202 CK_MECHANISM_PTR pMechanism; in C_Digest() local [all …]
|
H A D | kernelVerify.c | 37 C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_VerifyInit() argument 51 if (pMechanism == NULL) { in C_VerifyInit() 56 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in C_VerifyInit() 130 verify_init.vi_mech.cm_param = pMechanism->pParameter; in C_VerifyInit() 131 verify_init.vi_mech.cm_param_len = pMechanism->ulParameterLen; in C_VerifyInit() 144 is_hmac(pMechanism->mechanism)) { in C_VerifyInit() 149 rv = emulate_init(session_p, pMechanism, in C_VerifyInit() 454 C_VerifyRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_VerifyRecoverInit() argument 469 if (pMechanism == NULL) { in C_VerifyRecoverInit() 474 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in C_VerifyRecoverInit() [all …]
|
H A D | kernelSign.c | 36 C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_SignInit() argument 50 if (pMechanism == NULL) { in C_SignInit() 55 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in C_SignInit() 127 sign_init.si_mech.cm_param = pMechanism->pParameter; in C_SignInit() 128 sign_init.si_mech.cm_param_len = pMechanism->ulParameterLen; in C_SignInit() 141 is_hmac(pMechanism->mechanism)) { in C_SignInit() 146 rv = emulate_init(session_p, pMechanism, in C_SignInit() 498 C_SignRecoverInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, in C_SignRecoverInit() argument 513 if (pMechanism == NULL) { in C_SignRecoverInit() 518 rv = kernel_mech(pMechanism->mechanism, &k_mech_type); in C_SignRecoverInit() [all …]
|