Lines Matching refs:rv
94 try_again(CK_RV rv) in try_again() argument
99 if (rv == stop_rv[i]) { in try_again()
115 CK_RV rv; in meta_CreateObject() local
127 rv = meta_handle2session(hSession, &session); in meta_CreateObject()
128 if (rv != CKR_OK) in meta_CreateObject()
129 return (rv); in meta_CreateObject()
131 rv = meta_object_alloc(session, &object); in meta_CreateObject()
132 if (rv != CKR_OK) in meta_CreateObject()
138 rv = meta_slot_object_alloc(&slot_object); in meta_CreateObject()
139 if (rv != CKR_OK) in meta_CreateObject()
151 rv = CKR_SESSION_READ_ONLY; in meta_CreateObject()
206 rv = meta_get_slot_session(slot_num, &slot_session, in meta_CreateObject()
208 if (rv != CKR_OK) in meta_CreateObject()
212 rv = FUNCLIST(slot_session->fw_st_id)->C_CreateObject( in meta_CreateObject()
215 if (rv != CKR_OK) in meta_CreateObject()
237 rv = meta_get_slot_session(slot_num, &slot_session, in meta_CreateObject()
239 if (rv != CKR_OK) in meta_CreateObject()
243 rv = FUNCLIST(slot_session->fw_st_id)->C_CreateObject( in meta_CreateObject()
246 if (rv == CKR_OK) in meta_CreateObject()
249 if (!try_again(rv)) in meta_CreateObject()
254 first_rv = rv; in meta_CreateObject()
262 if (rv == CKR_OK) { in meta_CreateObject()
285 if (rv == other_rv[i]) { in meta_CreateObject()
286 rv = CKR_FUNCTION_FAILED; in meta_CreateObject()
291 rv = first_rv; in meta_CreateObject()
306 rv = get_master_attributes_by_template(pTemplate, ulCount, in meta_CreateObject()
308 if (rv == CKR_OK) { in meta_CreateObject()
311 rv = attribute_set_value(&(pTemplate[i]), in meta_CreateObject()
333 return (rv); in meta_CreateObject()
346 CK_RV rv, first_rv; in meta_CopyObject() local
361 rv = meta_handle2session(hSession, &session); in meta_CopyObject()
362 if (rv != CKR_OK) in meta_CopyObject()
363 return (rv); in meta_CopyObject()
365 rv = meta_handle2object(hObject, &src_object); in meta_CopyObject()
366 if (rv != CKR_OK) { in meta_CopyObject()
368 return (rv); in meta_CopyObject()
371 rv = meta_object_alloc(session, &dst_object); in meta_CopyObject()
372 if (rv != CKR_OK) in meta_CopyObject()
388 rv = CKR_SESSION_READ_ONLY; in meta_CopyObject()
403 rv = CKR_FUNCTION_FAILED; in meta_CopyObject()
422 rv = meta_slot_object_alloc(&dst_slot_object); in meta_CopyObject()
423 if (rv != CKR_OK) in meta_CopyObject()
426 rv = meta_get_slot_session(slotnum, &slot_session, in meta_CopyObject()
428 if (rv != CKR_OK) in meta_CopyObject()
431 rv = meta_object_get_clone(src_object, slotnum, in meta_CopyObject()
433 if (rv != CKR_OK) in meta_CopyObject()
437 rv = FUNCLIST(slot_session->fw_st_id)->C_CopyObject( in meta_CopyObject()
441 if (rv != CKR_OK) { in meta_CopyObject()
456 if (!try_again(rv)) { in meta_CopyObject()
460 first_rv = rv; in meta_CopyObject()
475 rv = meta_get_slot_session(slotnum, &slot_session, in meta_CopyObject()
477 if (rv != CKR_OK) { in meta_CopyObject()
481 rv = meta_object_get_clone(src_object, slotnum, in meta_CopyObject()
483 if (rv != CKR_OK) in meta_CopyObject()
488 rv = FUNCLIST(slot_session->fw_st_id)->C_CopyObject( in meta_CopyObject()
492 if (rv == CKR_OK) { in meta_CopyObject()
496 if (!try_again(rv)) { in meta_CopyObject()
504 if (rv == CKR_OK) { in meta_CopyObject()
506 rv = meta_object_get_attr(slot_session, in meta_CopyObject()
508 if (rv != CKR_OK) { in meta_CopyObject()
523 rv = get_master_attributes_by_duplication( in meta_CopyObject()
532 if (rv != CKR_OK) in meta_CopyObject()
536 rv = attribute_set_value(pTemplate + i, in meta_CopyObject()
540 if (rv != CKR_OK) in meta_CopyObject()
566 if (rv == other_rv[j]) { in meta_CopyObject()
567 rv = CKR_FUNCTION_FAILED; in meta_CopyObject()
572 rv = first_rv; in meta_CopyObject()
579 if (rv != CKR_OK) { in meta_CopyObject()
594 return (rv); in meta_CopyObject()
609 CK_RV rv; in meta_DestroyObject() local
613 rv = meta_handle2session(hSession, &session); in meta_DestroyObject()
614 if (rv != CKR_OK) in meta_DestroyObject()
615 return (rv); in meta_DestroyObject()
617 rv = meta_handle2object(hObject, &object); in meta_DestroyObject()
618 if (rv != CKR_OK) { in meta_DestroyObject()
620 return (rv); in meta_DestroyObject()
632 rv = meta_object_deactivate(object, B_FALSE, B_TRUE); in meta_DestroyObject()
638 if (rv == CKR_OK) in meta_DestroyObject()
639 rv = meta_object_dealloc(session, object, B_TRUE); in meta_DestroyObject()
643 return (rv); in meta_DestroyObject()
673 CK_RV rv; in meta_GetAttributeValue() local
682 rv = meta_handle2session(hSession, &session); in meta_GetAttributeValue()
683 if (rv != CKR_OK) in meta_GetAttributeValue()
684 return (rv); in meta_GetAttributeValue()
686 rv = meta_handle2object(hObject, &object); in meta_GetAttributeValue()
687 if (rv != CKR_OK) { in meta_GetAttributeValue()
689 return (rv); in meta_GetAttributeValue()
694 rv = meta_get_slot_session(slotnum, &slot_session, in meta_GetAttributeValue()
696 if (rv == CKR_OK) { in meta_GetAttributeValue()
697 rv = FUNCLIST(slot_session->fw_st_id)->C_GetAttributeValue( in meta_GetAttributeValue()
707 return (rv); in meta_GetAttributeValue()
729 CK_RV rv = CKR_OK, save_rv = CKR_OK; in meta_SetAttributeValue() local
743 rv = meta_handle2session(hSession, &session); in meta_SetAttributeValue()
744 if (rv != CKR_OK) in meta_SetAttributeValue()
745 return (rv); in meta_SetAttributeValue()
747 rv = meta_handle2object(hObject, &object); in meta_SetAttributeValue()
748 if (rv != CKR_OK) { in meta_SetAttributeValue()
750 return (rv); in meta_SetAttributeValue()
755 rv = CKR_SESSION_READ_ONLY; in meta_SetAttributeValue()
767 rv = meta_get_slot_session(slotnum, &slot_session, in meta_SetAttributeValue()
769 if (rv == CKR_OK) { in meta_SetAttributeValue()
770 rv = FUNCLIST(slot_session->fw_st_id)->\ in meta_SetAttributeValue()
802 rv = CKR_HOST_MEMORY; in meta_SetAttributeValue()
808 rv = meta_get_slot_session(slotnum, &slot_session, in meta_SetAttributeValue()
810 if (rv != CKR_OK) { in meta_SetAttributeValue()
814 rv = FUNCLIST(slot_session->fw_st_id)->\ in meta_SetAttributeValue()
819 if (rv != CKR_OK) { in meta_SetAttributeValue()
823 save_rv = rv; in meta_SetAttributeValue()
832 rv = save_rv; in meta_SetAttributeValue()
847 rv = meta_get_slot_session(slotnum, in meta_SetAttributeValue()
849 if (rv == CKR_OK) { in meta_SetAttributeValue()
886 rv = CKR_FUNCTION_FAILED; in meta_SetAttributeValue()
889 rv = CKR_OK; in meta_SetAttributeValue()
896 rv = meta_get_slot_session(object->master_clone_slotnum, in meta_SetAttributeValue()
898 if (rv == CKR_OK) { in meta_SetAttributeValue()
927 return (rv); in meta_SetAttributeValue()
971 CK_RV rv; in process_find_results() local
985 rv = meta_object_alloc(session, &object); in process_find_results()
986 if (rv != CKR_OK) { in process_find_results()
987 return (rv); in process_find_results()
990 rv = meta_slot_object_alloc(&slot_object); in process_find_results()
991 if (rv != CKR_OK) { in process_find_results()
994 return (rv); in process_find_results()
1003 rv = meta_object_get_attr(slot_session, in process_find_results()
1005 if (rv != CKR_OK) { in process_find_results()
1008 return (rv); in process_find_results()
1019 rv = add_to_search_result(object, info, in process_find_results()
1021 if (rv != CKR_OK) { in process_find_results()
1022 return (rv); in process_find_results()
1038 CK_RV rv; in meta_search_for_objects() local
1041 rv = FUNCLIST(fw_st_id)->C_FindObjectsInit(hSession, in meta_search_for_objects()
1044 if (rv != CKR_OK) { in meta_search_for_objects()
1045 return (rv); in meta_search_for_objects()
1049 rv = FUNCLIST(fw_st_id)->C_FindObjects(hSession, tmp_results, in meta_search_for_objects()
1051 if (rv != CKR_OK) { in meta_search_for_objects()
1052 return (rv); in meta_search_for_objects()
1055 rv = process_find_results(tmp_results, tmp_num_results, in meta_search_for_objects()
1058 if (rv != CKR_OK) { in meta_search_for_objects()
1059 return (rv); in meta_search_for_objects()
1064 rv = FUNCLIST(fw_st_id)->C_FindObjects(hSession, tmp_results, in meta_search_for_objects()
1066 if (rv != CKR_OK) { in meta_search_for_objects()
1067 return (rv); in meta_search_for_objects()
1070 rv = process_find_results(tmp_results, tmp_num_results, in meta_search_for_objects()
1073 if (rv != CKR_OK) { in meta_search_for_objects()
1074 return (rv); in meta_search_for_objects()
1078 rv = FUNCLIST(fw_st_id)->C_FindObjectsFinal(hSession); in meta_search_for_objects()
1079 return (rv); in meta_search_for_objects()
1098 CK_RV rv; in meta_FindObjectsInit() local
1106 rv = meta_handle2session(hSession, &session); in meta_FindObjectsInit()
1107 if (rv != CKR_OK) in meta_FindObjectsInit()
1108 return (rv); in meta_FindObjectsInit()
1132 rv = meta_get_slot_session(keystore_slotnum, in meta_FindObjectsInit()
1134 if (rv != CKR_OK) { in meta_FindObjectsInit()
1137 rv = meta_search_for_objects(session, in meta_FindObjectsInit()
1140 if (rv != CKR_OK) { in meta_FindObjectsInit()
1146 rv = meta_get_slot_session(slot_num, in meta_FindObjectsInit()
1148 if (rv != CKR_OK) { in meta_FindObjectsInit()
1169 rv = CKR_HOST_MEMORY; in meta_FindObjectsInit()
1178 rv = meta_search_for_objects(session, in meta_FindObjectsInit()
1185 rv = meta_search_for_objects(session, in meta_FindObjectsInit()
1192 if (rv != CKR_OK) { in meta_FindObjectsInit()
1204 if (rv != CKR_OK) { in meta_FindObjectsInit()
1213 return (rv); in meta_FindObjectsInit()
1229 CK_RV rv; in meta_FindObjects() local
1236 rv = meta_handle2session(hSession, &session); in meta_FindObjects()
1237 if (rv != CKR_OK) in meta_FindObjects()
1238 return (rv); in meta_FindObjects()
1265 return (rv); in meta_FindObjects()
1276 CK_RV rv; in meta_FindObjectsFinal() local
1280 rv = meta_handle2session(hSession, &session); in meta_FindObjectsFinal()
1281 if (rv != CKR_OK) in meta_FindObjectsFinal()
1282 return (rv); in meta_FindObjectsFinal()
1297 return (rv); in meta_FindObjectsFinal()