Lines Matching defs:tmpl

302 template_add_attributes(TEMPLATE	* tmpl,
329 rc = template_update_attribute(tmpl, attr);
343 template_add_default_attributes(TEMPLATE * tmpl,
352 rc = template_set_default_common_attributes(tmpl);
360 return (data_object_set_default_attributes(tmpl, mode));
363 return (cert_x509_set_default_attributes(tmpl, mode));
370 tmpl, mode));
379 tmpl, mode));
388 tmpl, mode));
397 tmpl));
400 tmpl));
421 template_attribute_find(TEMPLATE * tmpl,
428 if (! tmpl || ! attr)
430 node = tmpl->attribute_list;
452 template_attribute_find_multiple(TEMPLATE * tmpl,
461 tmpl, parselist[i].type, &attr);
470 template_check_required_attributes(TEMPLATE * tmpl,
477 tmpl, mode));
481 tmpl, mode));
484 tmpl, mode));
489 tmpl, mode));
497 tmpl, mode));
506 tmpl, mode));
516 tmpl, mode));
520 tmpl, mode));
541 template_check_required_base_attributes(TEMPLATE * tmpl,
547 found = template_attribute_find(tmpl, CKA_CLASS, &attr);
630 template_flatten(TEMPLATE * tmpl,
642 if (! tmpl || ! dest) {
646 node = tmpl->attribute_list;
705 TEMPLATE * tmpl = NULL;
719 tmpl = (TEMPLATE *)malloc(sizeof (TEMPLATE));
720 if (! tmpl) {
723 (void) memset(tmpl, 0x0, sizeof (TEMPLATE));
734 (void) template_free(tmpl);
810 rc = template_update_attribute(tmpl, a2);
813 (void) template_free(tmpl);
824 *new_tmpl = tmpl;
829 template_free(TEMPLATE *tmpl) {
830 if (! tmpl)
832 while (tmpl->attribute_list) {
833 CK_ATTRIBUTE *attr = (CK_ATTRIBUTE *)tmpl->attribute_list->data;
838 tmpl->attribute_list = dlist_remove_node(tmpl->attribute_list,
839 tmpl->attribute_list);
842 free(tmpl);
847 template_get_class(TEMPLATE * tmpl,
854 if (! tmpl || ! class || ! subclass)
856 node = tmpl->attribute_list;
879 template_get_count(TEMPLATE *tmpl)
881 if (tmpl == NULL)
883 return (dlist_length(tmpl->attribute_list));
887 template_get_size(TEMPLATE *tmpl)
892 if (tmpl == NULL)
894 node = tmpl->attribute_list;
907 template_get_compressed_size(TEMPLATE *tmpl)
912 if (tmpl == NULL)
914 node = tmpl->attribute_list;
949 template_check_exportability(TEMPLATE *tmpl, CK_ATTRIBUTE_TYPE type)
956 if (! tmpl)
958 (void) template_get_class(tmpl, &class, &subclass);
962 val = template_attribute_find(tmpl, CKA_SENSITIVE, &attr);
1024 template_set_default_common_attributes(TEMPLATE *tmpl)
1067 (void) template_update_attribute(tmpl, token_attr);
1068 (void) template_update_attribute(tmpl, priv_attr);
1069 (void) template_update_attribute(tmpl, mod_attr);
1070 (void) template_update_attribute(tmpl, label_attr);
1076 template_update_attribute(TEMPLATE *tmpl, CK_ATTRIBUTE *new_attr) {
1080 if (! tmpl || ! new_attr) {
1083 node = tmpl->attribute_list;
1090 tmpl->attribute_list = dlist_remove_node(
1091 tmpl->attribute_list, node);
1098 tmpl->attribute_list = dlist_add_as_first(
1099 tmpl->attribute_list, new_attr);
1105 template_validate_attribute(TEMPLATE * tmpl,
1112 return (data_object_validate_attribute(tmpl, attr, mode));
1115 return (cert_x509_validate_attribute(tmpl, attr, mode));
1117 return (cert_vendor_validate_attribute(tmpl,
1123 return (rsa_publ_validate_attribute(tmpl,
1132 return (rsa_priv_validate_attribute(tmpl,
1140 return (generic_secret_validate_attribute(tmpl,
1149 return (clock_validate_attribute(tmpl,
1152 return (counter_validate_attribute(tmpl,
1167 template_validate_attributes(TEMPLATE * tmpl,
1175 node = tmpl->attribute_list;
1180 rc = template_validate_attribute(tmpl, attr, class,
1192 template_validate_base_attribute(TEMPLATE * tmpl,
1196 if (! tmpl || ! attr) {