Lines Matching refs:rc

346 	enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR;  in load_tee_ec_key_attrs()  local
372 rc = PKCS11_CKR_OK; in load_tee_ec_key_attrs()
417 rc = PKCS11_CKR_OK; in load_tee_ec_key_attrs()
426 if (rc == PKCS11_CKR_OK) { in load_tee_ec_key_attrs()
433 return rc; in load_tee_ec_key_attrs()
495 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in tee2pkcs_ec_attributes() local
497 rc = tee2pkcs_add_attribute(priv_head, PKCS11_CKA_VALUE, in tee2pkcs_ec_attributes()
499 if (rc) in tee2pkcs_ec_attributes()
502 rc = alloc_get_tee_attribute_data(tee_obj, TEE_ATTR_ECC_PUBLIC_VALUE_X, in tee2pkcs_ec_attributes()
504 if (rc) in tee2pkcs_ec_attributes()
507 rc = alloc_get_tee_attribute_data(tee_obj, TEE_ATTR_ECC_PUBLIC_VALUE_Y, in tee2pkcs_ec_attributes()
509 if (rc) in tee2pkcs_ec_attributes()
514 rc = PKCS11_CKR_ARGUMENTS_BAD; in tee2pkcs_ec_attributes()
529 rc = PKCS11_CKR_MECHANISM_PARAM_INVALID; in tee2pkcs_ec_attributes()
535 rc = PKCS11_CKR_DEVICE_MEMORY; in tee2pkcs_ec_attributes()
572 rc = add_attribute(priv_head, PKCS11_CKA_OPTEE_HIDDEN_EC_POINT, in tee2pkcs_ec_attributes()
574 if (rc) in tee2pkcs_ec_attributes()
577 rc = add_attribute(pub_head, PKCS11_CKA_EC_POINT, ecpoint, dersize); in tee2pkcs_ec_attributes()
586 return rc; in tee2pkcs_ec_attributes()
593 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in generate_ec_keys() local
638 rc = tee2pkcs_error(res); in generate_ec_keys()
644 rc = tee2pkcs_error(res); in generate_ec_keys()
649 rc = add_attribute(priv_head, PKCS11_CKA_EC_PARAMS, a_ptr, a_size); in generate_ec_keys()
650 if (rc) in generate_ec_keys()
653 rc = tee2pkcs_ec_attributes(pub_head, priv_head, tee_obj, tee_size); in generate_ec_keys()
659 return rc; in generate_ec_keys()
668 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in load_tee_eddsa_key_attrs() local
685 rc = PKCS11_CKR_OK; in load_tee_eddsa_key_attrs()
706 rc = PKCS11_CKR_OK; in load_tee_eddsa_key_attrs()
715 if (rc == PKCS11_CKR_OK) { in load_tee_eddsa_key_attrs()
722 return rc; in load_tee_eddsa_key_attrs()
729 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in generate_eddsa_keys() local
768 rc = tee2pkcs_error(res); in generate_eddsa_keys()
774 rc = tee2pkcs_error(res); in generate_eddsa_keys()
779 rc = add_attribute(priv_head, PKCS11_CKA_EC_PARAMS, a_ptr, a_size); in generate_eddsa_keys()
780 if (rc) in generate_eddsa_keys()
783 rc = tee2pkcs_add_attribute(priv_head, PKCS11_CKA_VALUE, in generate_eddsa_keys()
785 if (rc) in generate_eddsa_keys()
788 rc = tee2pkcs_add_attribute(priv_head, PKCS11_CKA_EC_POINT, in generate_eddsa_keys()
790 if (rc) in generate_eddsa_keys()
793 rc = tee2pkcs_add_attribute(pub_head, PKCS11_CKA_EC_POINT, in generate_eddsa_keys()
800 return rc; in generate_eddsa_keys()
807 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in pkcs2tee_proc_params_eddsa() local
816 rc = serialargs_get_u32(&args, &flag); in pkcs2tee_proc_params_eddsa()
817 if (rc) in pkcs2tee_proc_params_eddsa()
818 return rc; in pkcs2tee_proc_params_eddsa()
820 rc = serialargs_get_u32(&args, &ctx_len); in pkcs2tee_proc_params_eddsa()
821 if (rc) in pkcs2tee_proc_params_eddsa()
822 return rc; in pkcs2tee_proc_params_eddsa()
824 rc = serialargs_get_ptr(&args, &ctx_data, ctx_len); in pkcs2tee_proc_params_eddsa()
825 if (rc) in pkcs2tee_proc_params_eddsa()
826 return rc; in pkcs2tee_proc_params_eddsa()
870 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in pkcs2tee_param_ecdh() local
878 rc = serialargs_get_u32(&args, &word); in pkcs2tee_param_ecdh()
879 if (rc) in pkcs2tee_param_ecdh()
880 return rc; in pkcs2tee_param_ecdh()
883 rc = serialargs_get_u32(&args, &word); in pkcs2tee_param_ecdh()
884 if (rc || word) in pkcs2tee_param_ecdh()
885 return rc; in pkcs2tee_param_ecdh()
888 rc = serialargs_get_u32(&args, &word); in pkcs2tee_param_ecdh()
889 if (rc || !word) in pkcs2tee_param_ecdh()
890 return rc; in pkcs2tee_param_ecdh()
894 rc = serialargs_get(&args, &byte, sizeof(uint8_t)); in pkcs2tee_param_ecdh()
895 if (rc) in pkcs2tee_param_ecdh()
896 return rc; in pkcs2tee_param_ecdh()
913 rc = serialargs_get_ptr(&args, pub_data, *pub_size); in pkcs2tee_param_ecdh()
914 if (rc) in pkcs2tee_param_ecdh()
915 return rc; in pkcs2tee_param_ecdh()
927 enum pkcs11_rc rc = PKCS11_CKR_GENERAL_ERROR; in pkcs2tee_algo_ecdh() local
933 rc = serialargs_get_u32(&args, &kdf); in pkcs2tee_algo_ecdh()
934 if (rc) in pkcs2tee_algo_ecdh()
935 return rc; in pkcs2tee_algo_ecdh()