Lines Matching refs:temp
222 struct obj_attrs *temp, in set_mandatory_boolprops() argument
230 rc = pkcs11_import_object_boolprop(out, temp, bp[n]); in set_mandatory_boolprops()
239 struct obj_attrs *temp, in set_mandatory_attributes() argument
250 if (get_attribute_ptr(temp, attrs[n], &value, &size)) in set_mandatory_attributes()
274 struct obj_attrs *temp, in set_optional_attributes_with_def() argument
286 rc = get_attribute_ptr(temp, attrs[n], &value, &size); in set_optional_attributes_with_def()
307 struct obj_attrs *temp, in set_attributes_opt_or_null() argument
311 return set_optional_attributes_with_def(out, temp, attrs, attrs_count, in set_attributes_opt_or_null()
316 struct obj_attrs *temp, in set_optional_attributes() argument
320 return set_optional_attributes_with_def(out, temp, attrs, attrs_count, in set_optional_attributes()
492 struct obj_attrs *temp) in create_storage_attributes() argument
502 class = get_class(temp); in create_storage_attributes()
512 rc = set_mandatory_boolprops(out, temp, any_object_boolprops, in create_storage_attributes()
517 return set_attributes_opt_or_null(out, temp, any_object_opt_or_null, in create_storage_attributes()
522 struct obj_attrs *temp) in create_genkey_attributes() argument
527 rc = create_storage_attributes(out, temp); in create_genkey_attributes()
531 type = get_key_type(temp); in create_genkey_attributes()
541 rc = set_mandatory_boolprops(out, temp, any_key_boolprops, in create_genkey_attributes()
546 rc = set_attributes_opt_or_null(out, temp, any_key_opt_or_null, in create_genkey_attributes()
551 return set_optional_attributes(out, temp, any_key_optional, in create_genkey_attributes()
557 struct obj_attrs *temp) in create_symm_key_attributes() argument
561 assert(get_class(temp) == PKCS11_CKO_SECRET_KEY); in create_symm_key_attributes()
563 rc = create_genkey_attributes(out, temp); in create_symm_key_attributes()
586 rc = set_mandatory_boolprops(out, temp, symm_key_boolprops, in create_symm_key_attributes()
591 rc = set_attributes_opt_or_null(out, temp, symm_key_opt_or_null, in create_symm_key_attributes()
596 return set_optional_attributes(out, temp, symm_key_optional, in create_symm_key_attributes()
601 struct obj_attrs *temp) in create_data_attributes() argument
605 assert(get_class(temp) == PKCS11_CKO_DATA); in create_data_attributes()
607 rc = create_storage_attributes(out, temp); in create_data_attributes()
613 return set_attributes_opt_or_null(out, temp, raw_data_opt_or_null, in create_data_attributes()
618 struct obj_attrs *temp) in create_certificate_attributes() argument
632 assert(get_class(temp) == PKCS11_CKO_CERTIFICATE); in create_certificate_attributes()
634 rc = create_storage_attributes(out, temp); in create_certificate_attributes()
640 rc = set_mandatory_boolprops(out, temp, pkcs11_certificate_boolprops, in create_certificate_attributes()
645 rc = set_mandatory_attributes(out, temp, pkcs11_certificate_mandated, in create_certificate_attributes()
650 rc = set_optional_attributes(out, temp, pkcs11_certificate_optional, in create_certificate_attributes()
670 rc = set_mandatory_attributes(out, temp, mandated, mandated_count); in create_certificate_attributes()
674 rc = set_optional_attributes(out, temp, optional, optional_count); in create_certificate_attributes()
734 struct obj_attrs *temp, in create_pub_key_attributes() argument
743 assert(get_class(temp) == PKCS11_CKO_PUBLIC_KEY); in create_pub_key_attributes()
745 rc = create_genkey_attributes(out, temp); in create_pub_key_attributes()
751 rc = set_mandatory_boolprops(out, temp, public_key_boolprops, in create_pub_key_attributes()
756 rc = set_mandatory_attributes(out, temp, public_key_mandated, in create_pub_key_attributes()
761 rc = set_attributes_opt_or_null(out, temp, in create_pub_key_attributes()
801 rc = set_mandatory_attributes(out, temp, mandated, mandated_count); in create_pub_key_attributes()
805 return set_attributes_opt_or_null(out, temp, oon, oon_count); in create_pub_key_attributes()
810 struct obj_attrs *temp, in create_pub_key_rsa_generated_attributes() argument
822 if (get_attribute_ptr(temp, PKCS11_CKA_MODULUS, in create_pub_key_rsa_generated_attributes()
836 struct obj_attrs *temp, in create_pub_key_generated_attributes() argument
843 rc = create_pub_key_rsa_generated_attributes(out, temp, in create_pub_key_generated_attributes()
855 struct obj_attrs *temp) in create_priv_key_attributes() argument
863 assert(get_class(temp) == PKCS11_CKO_PRIVATE_KEY); in create_priv_key_attributes()
865 rc = create_genkey_attributes(out, temp); in create_priv_key_attributes()
871 rc = set_mandatory_boolprops(out, temp, private_key_boolprops, in create_priv_key_attributes()
876 rc = set_mandatory_attributes(out, temp, private_key_mandated, in create_priv_key_attributes()
881 rc = set_attributes_opt_or_null(out, temp, private_key_opt_or_null, in create_priv_key_attributes()
910 rc = set_mandatory_attributes(out, temp, mandated, mandated_count); in create_priv_key_attributes()
914 return set_attributes_opt_or_null(out, temp, oon, oon_count); in create_priv_key_attributes()
925 struct obj_attrs *temp, in create_ec_priv_key_hidden_attributes() argument
955 if (get_attribute_ptr(temp, PKCS11_CKA_EC_PARAMS, in create_ec_priv_key_hidden_attributes()
991 if (get_attribute_ptr(temp, PKCS11_CKA_VALUE, in create_ec_priv_key_hidden_attributes()
1092 struct obj_attrs *temp, in create_priv_key_hidden_attributes() argument
1099 rc = create_ec_priv_key_hidden_attributes(out, temp, function); in create_priv_key_hidden_attributes()
1110 sanitize_symm_key_attributes(struct obj_attrs **temp, in sanitize_symm_key_attributes() argument
1116 assert(get_class(*temp) == PKCS11_CKO_SECRET_KEY); in sanitize_symm_key_attributes()
1118 rc = get_attribute_ptr(*temp, PKCS11_CKA_VALUE, NULL, &a_size); in sanitize_symm_key_attributes()
1120 switch (get_key_type(*temp)) { in sanitize_symm_key_attributes()
1135 if (get_attribute_ptr(*temp, PKCS11_CKA_VALUE_LEN, NULL, in sanitize_symm_key_attributes()
1139 return add_attribute(temp, PKCS11_CKA_VALUE_LEN, in sanitize_symm_key_attributes()
1151 get_key_type(*temp), id2str_key_type(get_key_type(*temp))); in sanitize_symm_key_attributes()
1185 struct obj_attrs *temp = NULL; in create_attributes_from_template() local
1265 rc = sanitize_client_object(&temp, template, template_size, class, in create_attributes_from_template()
1278 *out = temp; in create_attributes_from_template()
1290 rc = attributes_match_add_reference(&temp, req_attrs); in create_attributes_from_template()
1304 if (get_class(temp) != PKCS11_CKO_SECRET_KEY || in create_attributes_from_template()
1305 get_key_type(temp) != PKCS11_CKK_GENERIC_SECRET) { in create_attributes_from_template()
1311 if (get_class(temp) != PKCS11_CKO_SECRET_KEY || in create_attributes_from_template()
1312 get_key_type(temp) != PKCS11_CKK_AES) { in create_attributes_from_template()
1318 if ((get_class(temp) != PKCS11_CKO_PUBLIC_KEY && in create_attributes_from_template()
1319 get_class(temp) != PKCS11_CKO_PRIVATE_KEY) || in create_attributes_from_template()
1320 get_key_type(temp) != PKCS11_CKK_EC) { in create_attributes_from_template()
1326 if ((get_class(temp) != PKCS11_CKO_PUBLIC_KEY && in create_attributes_from_template()
1327 get_class(temp) != PKCS11_CKO_PRIVATE_KEY) || in create_attributes_from_template()
1328 get_key_type(temp) != PKCS11_CKK_EC_EDWARDS) { in create_attributes_from_template()
1334 if ((get_class(temp) != PKCS11_CKO_PUBLIC_KEY && in create_attributes_from_template()
1335 get_class(temp) != PKCS11_CKO_PRIVATE_KEY) || in create_attributes_from_template()
1336 get_key_type(temp) != PKCS11_CKK_RSA) { in create_attributes_from_template()
1345 if (!sanitize_consistent_class_and_type(temp)) { in create_attributes_from_template()
1359 switch (get_class(temp)) { in create_attributes_from_template()
1361 rc = create_data_attributes(&attrs, temp); in create_attributes_from_template()
1364 rc = create_certificate_attributes(&attrs, temp); in create_attributes_from_template()
1367 rc = sanitize_symm_key_attributes(&temp, function); in create_attributes_from_template()
1370 rc = create_symm_key_attributes(&attrs, temp); in create_attributes_from_template()
1373 rc = create_pub_key_attributes(&attrs, temp, function); in create_attributes_from_template()
1376 rc = create_pub_key_generated_attributes(&attrs, temp, in create_attributes_from_template()
1380 rc = create_priv_key_attributes(&attrs, temp); in create_attributes_from_template()
1383 rc = create_priv_key_hidden_attributes(&attrs, temp, function); in create_attributes_from_template()
1387 get_class(temp), id2str_class(get_class(temp))); in create_attributes_from_template()
1395 if (get_attribute_ptr(temp, PKCS11_CKA_LOCAL, NULL, NULL) != in create_attributes_from_template()
1401 if (get_attribute_ptr(temp, PKCS11_CKA_KEY_GEN_MECHANISM, NULL, NULL) != in create_attributes_from_template()
1449 if (get_attribute_ptr(temp, PKCS11_CKA_EXTRACTABLE, in create_attributes_from_template()
1504 TEE_Free(temp); in create_attributes_from_template()