Lines Matching refs:rc

95 	enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR;  in pkcs2tee_algorithm()  local
115 rc = pkcs2tee_algo_rsa_pss(tee_id, proc_params); in pkcs2tee_algorithm()
118 rc = pkcs2tee_algo_rsa_oaep(tee_id, tee_hash_id, proc_params); in pkcs2tee_algorithm()
126 rc = pkcs2tee_algo_ecdsa(tee_id, proc_params, obj); in pkcs2tee_algorithm()
129 rc = PKCS11_CKR_OK; in pkcs2tee_algorithm()
143 return rc; in pkcs2tee_algorithm()
249 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in load_tee_key() local
288 rc = pkcs2tee_key_type(&obj->key_type, obj, function); in load_tee_key()
289 if (rc) in load_tee_key()
290 return rc; in load_tee_key()
298 rc = load_tee_rsa_key_attrs(&tee_attrs, &tee_attrs_count, obj); in load_tee_key()
301 rc = load_tee_ec_key_attrs(&tee_attrs, &tee_attrs_count, obj); in load_tee_key()
306 if (rc) in load_tee_key()
307 return rc; in load_tee_key()
350 enum pkcs11_rc rc = PKCS11_CKR_OK; in init_tee_operation() local
360 rc = pkcs2tee_proc_params_rsa_pss(proc, proc_params); in init_tee_operation()
361 if (rc) in init_tee_operation()
364 rc = pkcs2tee_validate_rsa_pss(proc, obj); in init_tee_operation()
367 rc = pkcs2tee_proc_params_rsa_oaep(proc, proc_params); in init_tee_operation()
373 return rc; in init_tee_operation()
381 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in init_asymm_operation() local
385 rc = allocate_tee_operation(session, function, proc_params, obj); in init_asymm_operation()
386 if (rc) in init_asymm_operation()
387 return rc; in init_asymm_operation()
389 rc = load_tee_key(session, obj, function); in init_asymm_operation()
390 if (rc) in init_asymm_operation()
391 return rc; in init_asymm_operation()
410 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in step_asymm_operation() local
469 rc = PKCS11_CKR_DEVICE_MEMORY; in step_asymm_operation()
489 rc = PKCS11_CKR_DEVICE_MEMORY; in step_asymm_operation()
529 rc = PKCS11_CKR_OK; in step_asymm_operation()
536 rc = PKCS11_CKR_GENERAL_ERROR; in step_asymm_operation()
575 rc = tee2pkcs_error(res); in step_asymm_operation()
576 if (rc != PKCS11_CKR_OK) in step_asymm_operation()
594 rc = PKCS11_CKR_FUNCTION_FAILED; in step_asymm_operation()
606 rc = PKCS11_CKR_SIGNATURE_LEN_RANGE; in step_asymm_operation()
618 rc = PKCS11_CKR_FUNCTION_FAILED; in step_asymm_operation()
624 rc = PKCS11_CKR_SIGNATURE_LEN_RANGE; in step_asymm_operation()
644 rc = PKCS11_CKR_FUNCTION_FAILED; in step_asymm_operation()
649 rc = PKCS11_CKR_SIGNATURE_LEN_RANGE; in step_asymm_operation()
671 rc = tee2pkcs_error(res); in step_asymm_operation()
672 if (rc == PKCS11_CKR_ARGUMENTS_BAD) in step_asymm_operation()
673 rc = PKCS11_CKR_DATA_LEN_RANGE; in step_asymm_operation()
682 rc = tee2pkcs_error(res); in step_asymm_operation()
683 if (rc == PKCS11_CKR_ARGUMENTS_BAD) in step_asymm_operation()
684 rc = PKCS11_CKR_ENCRYPTED_DATA_LEN_RANGE; in step_asymm_operation()
694 rc = tee2pkcs_error(res); in step_asymm_operation()
703 rc = tee2pkcs_error(res); in step_asymm_operation()
736 rc = tee2pkcs_error(res); in step_asymm_operation()
745 rc = tee2pkcs_error(res); in step_asymm_operation()
760 (rc == PKCS11_CKR_OK || rc == PKCS11_CKR_BUFFER_TOO_SMALL)) { in step_asymm_operation()
767 rc = PKCS11_CKR_GENERAL_ERROR; in step_asymm_operation()
775 return rc; in step_asymm_operation()