Lines Matching defs:rv

113 	CK_RV rv, save_rv;
147 rv = meta_operation_init_defer(optype, session,
152 if (rv != CKR_OK)
153 return (rv);
173 rv = meta_mechManager_get_slots(&(session->mech_support_info),
175 if (rv != CKR_OK) {
180 rv = CKR_FUNCTION_FAILED;
222 rv = meta_get_slot_session(slotnum, &init_session,
224 if (rv != CKR_OK) {
231 rv = meta_object_get_clone(key, slotnum, init_session,
234 if (rv != CKR_OK) {
242 rv = FUNCLIST(fw_st_id)->C_EncryptInit(
247 rv = FUNCLIST(fw_st_id)->C_DecryptInit(
252 rv = FUNCLIST(fw_st_id)->C_DigestInit(
256 rv = FUNCLIST(fw_st_id)->C_SignInit(
261 rv = FUNCLIST(fw_st_id)->C_VerifyInit(
266 rv = FUNCLIST(fw_st_id)->C_SignRecoverInit(
271 rv = FUNCLIST(fw_st_id)->C_VerifyRecoverInit(
278 rv = CKR_FUNCTION_FAILED;
282 if (rv == CKR_OK)
287 save_rv = rv;
297 if (rv == CKR_OK) {
315 rv = save_rv;
319 return (rv);
330 CK_RV rv = CKR_FUNCTION_FAILED;
360 rv = meta_operation_init_defer(optype, session, &mech,
365 if (rv != CKR_OK)
366 return (rv);
396 rv = meta_get_slot_session(softtoken_slot_num,
398 if (rv != CKR_OK) {
405 rv = meta_object_get_clone(key, softtoken_slot_num,
408 if (rv != CKR_OK) {
426 rv = FUNCLIST(fw_st_id)->C_EncryptInit(
431 rv = FUNCLIST(fw_st_id)->C_DecryptInit(
436 rv = FUNCLIST(fw_st_id)->C_DigestInit(
442 rv = CKR_FUNCTION_FAILED;
446 if (rv == CKR_OK) {
470 return (rv);
513 CK_RV rv;
547 rv = meta_operation_init(optype,
551 if (rv != CKR_OK)
574 rv = meta_operation_init_softtoken(optype,
578 if (rv != CKR_OK) {
584 rv = meta_operation_init(optype,
588 if (rv != CKR_OK)
611 rv = CKR_FUNCTION_FAILED;
617 rv = FUNCLIST(fw_st_id)->C_Encrypt(hSession, in,
620 rv = FUNCLIST(fw_st_id)->C_EncryptUpdate(hSession, in,
623 rv = FUNCLIST(fw_st_id)->C_EncryptFinal(hSession, out,
627 rv = FUNCLIST(fw_st_id)->C_Decrypt(hSession, in,
630 rv = FUNCLIST(fw_st_id)->C_DecryptUpdate(hSession, in,
633 rv = FUNCLIST(fw_st_id)->C_DecryptFinal(hSession, out,
637 rv = FUNCLIST(fw_st_id)->C_Digest(hSession, in, inLen,
641 rv = FUNCLIST(fw_st_id)->C_DigestUpdate(hSession, in,
649 rv = meta_object_get_clone(object,
651 if (rv == CKR_OK)
652 rv = FUNCLIST(fw_st_id)->C_DigestKey(hSession,
655 rv = FUNCLIST(fw_st_id)->C_DigestFinal(hSession, out,
659 rv = FUNCLIST(fw_st_id)->C_Sign(hSession, in, inLen,
663 rv = FUNCLIST(fw_st_id)->C_SignUpdate(hSession, in,
666 rv = FUNCLIST(fw_st_id)->C_SignFinal(hSession, out,
672 rv = FUNCLIST(fw_st_id)->C_Verify(hSession, in,
676 rv = FUNCLIST(fw_st_id)->C_VerifyUpdate(hSession, in,
681 rv = FUNCLIST(fw_st_id)->C_VerifyFinal(hSession, in,
685 rv = FUNCLIST(fw_st_id)->C_SignRecover(hSession, in,
688 rv = FUNCLIST(fw_st_id)->C_VerifyRecover(hSession, in,
692 rv = CKR_FUNCTION_FAILED;
713 if (rv == CKR_BUFFER_TOO_SMALL ||
714 (rv == CKR_OK && out == NULL && optype != CKF_VERIFY)) {
717 } else if (rv != CKR_OK) {
737 return (rv);
863 CK_RV rv = CKR_OK;
866 rv = meta_mechManager_slot_supports_mech(mech_type,
871 if (rv != CKR_OK) {
872 return (rv);
887 rv = CKR_FUNCTION_FAILED;
900 rv = meta_mechManager_get_slots(mech_support_info,
902 if (rv != CKR_OK) {
909 return (rv);
923 CK_RV rv, save_rv;
1016 rv = get_slotlist_for_mech(pMechanism->mechanism,
1020 if (rv != CKR_OK) {
1024 rv = meta_slot_object_alloc(&slot_key1);
1025 if (doKeyPair && rv == CKR_OK)
1026 rv = meta_slot_object_alloc(&slot_key2);
1027 if (rv != CKR_OK)
1053 rv = meta_get_slot_session(slotnum, &gen_session,
1055 if (rv != CKR_OK) {
1065 rv = meta_freetoken_set(slotnum,
1067 if (rv != CKR_OK)
1072 rv = meta_freetoken_set(slotnum,
1074 if (rv != CKR_OK)
1082 rv = FUNCLIST(fw_st_id)->C_GenerateKeyPair(hSession,
1087 rv = FUNCLIST(fw_st_id)->C_GenerateKey(hSession,
1092 if (rv == CKR_OK)
1097 save_rv = rv;
1105 if (rv != CKR_OK) {
1106 rv = save_rv;
1110 rv = meta_object_get_attr(gen_session, slot_key1->hObject, key1);
1111 if (rv != CKR_OK) {
1116 rv = meta_object_get_attr(gen_session, slot_key2->hObject,
1118 if (rv != CKR_OK) {
1132 rv = meta_freeobject_clone(session, key1);
1133 if (rv != CKR_OK)
1148 rv = meta_freeobject_clone(session, key2);
1149 if (rv != CKR_OK)
1164 if (rv == CKR_OK) {
1178 return (rv);
1191 CK_RV rv, save_rv;
1204 rv = get_slotlist_for_mech(pMechanism->mechanism,
1208 if (rv != CKR_OK) {
1209 return (rv);
1232 rv = meta_get_slot_session(slotnum, &wrap_session,
1234 if (rv != CKR_OK) {
1239 rv = meta_object_get_clone(wrappingkey, slotnum,
1241 if (rv != CKR_OK)
1244 rv = meta_object_get_clone(inputkey, slotnum,
1246 if (rv != CKR_OK)
1249 rv = FUNCLIST(wrap_session->fw_st_id)->C_WrapKey(
1254 if (rv == CKR_OK || rv == CKR_BUFFER_TOO_SMALL)
1259 save_rv = rv;
1267 if (rv != CKR_OK) {
1268 if (rv != CKR_BUFFER_TOO_SMALL) {
1270 rv = save_rv;
1277 if (rv == CKR_OK) {
1290 return (rv);
1306 CK_RV rv, save_rv;
1327 rv = get_slotlist_for_mech(pMechanism->mechanism,
1331 if (rv != CKR_OK) {
1332 return (rv);
1335 rv = meta_slot_object_alloc(&slot_unwrapped_key);
1336 if (rv != CKR_OK) {
1360 rv = meta_get_slot_session(slotnum, &unwrap_session,
1362 if (rv != CKR_OK) {
1367 rv = meta_object_get_clone(unwrapping_key, slotnum,
1369 if (rv != CKR_OK)
1372 rv = FUNCLIST(unwrap_session->fw_st_id)->C_UnwrapKey(
1377 if (rv == CKR_OK || rv == CKR_BUFFER_TOO_SMALL)
1381 save_rv = rv;
1391 if (rv != CKR_OK) {
1392 if (rv != CKR_BUFFER_TOO_SMALL) {
1393 rv = save_rv;
1402 rv = meta_object_get_attr(unwrap_session,
1404 if (rv != CKR_OK) {
1417 if (rv == CKR_OK) {
1431 return (rv);
1461 CK_RV rv, save_rv;
1493 rv = CKR_SESSION_READ_ONLY;
1509 rv = get_slotlist_for_mech(pMechanism->mechanism,
1513 if (rv != CKR_OK) {
1514 return (rv);
1524 rv = meta_slot_object_alloc(&slotkey1);
1526 if (rv == CKR_OK)
1527 rv = meta_slot_object_alloc(&slotkey2);
1528 if (rv == CKR_OK)
1529 rv = meta_slot_object_alloc(&slotkey3);
1530 if (rv == CKR_OK)
1531 rv = meta_slot_object_alloc(&slotkey4);
1533 if (rv != CKR_OK) {
1556 rv = meta_get_slot_session(slotnum, &derive_session,
1558 if (rv != CKR_OK) {
1563 rv = meta_object_get_clone(basekey1, slotnum,
1565 if (rv != CKR_OK)
1569 rv = meta_object_get_clone(basekey2, slotnum,
1571 if (rv != CKR_OK)
1579 rv = meta_freetoken_set(slotnum, &current_token_value,
1581 if (rv != CKR_OK)
1585 rv = FUNCLIST(derive_session->fw_st_id)->C_DeriveKey(
1590 if (rv == CKR_OK)
1594 save_rv = rv;
1604 if (rv != CKR_OK) {
1605 rv = save_rv;
1631 rv = meta_object_get_attr(derive_session,
1633 if (rv != CKR_OK) {
1637 rv = meta_object_get_attr(derive_session,
1639 if (rv != CKR_OK) {
1643 rv = meta_object_get_attr(derive_session,
1645 if (rv != CKR_OK) {
1649 rv = meta_object_get_attr(derive_session,
1651 if (rv != CKR_OK) {
1683 rv = meta_object_get_attr(derive_session,
1685 if (rv != CKR_OK) {
1717 if (rv == CKR_OK) {
1731 return (rv);