Lines Matching +defs:template +defs:c

3741     crypto_session_id_t session_id, crypto_object_attribute_t *template,
3756 session_id, 0, template, attribute_count, object, NULL, NULL,
3768 crypto_object_attribute_t *template, uint_t attribute_count,
3782 session_id, object, template, attribute_count, new_object,
3844 crypto_object_attribute_t *template, uint_t attribute_count,
3858 softc, req, session_id, object, template, attribute_count,
3870 crypto_object_attribute_t *template, uint_t attribute_count,
3884 softc, req, session_id, object, template, attribute_count,
3895 crypto_session_id_t session_id, crypto_object_attribute_t *template,
3910 session_id, 0, template, attribute_count, NULL, NULL,
3976 crypto_object_attribute_t *template, uint_t attribute_count,
3990 session_id, mechanism, template, attribute_count, object, NULL,
4062 size_t *wrapped_key_len_ptr, crypto_object_attribute_t *template,
4076 session_id, mechanism, template, attribute_count, key, NULL,
4089 crypto_key_t *base_key, crypto_object_attribute_t *template,
4103 session_id, mechanism, template, attribute_count, key, NULL,
4910 crypto_object_attribute_t *template, uint_t attribute_count,
4925 softc, req, session_id, mechanism, template, attribute_count,
4974 crypto_key_t *base_key, crypto_object_attribute_t *template,
4989 session_id, mechanism, template, attribute_count, NULL, NULL,
5284 crypto_object_attribute_t *template, uint_t attribute_count,
5297 taskq_req->dr_object_req.or_template = template;
5318 crypto_object_attribute_t *template, uint_t attribute_count,
5335 taskq_req->dr_key_req.kr_template = template;
6762 uchar_t c = 0;
6770 taskq_req->dr_random_req.rr_buf[i] = c++;
7012 crypto_object_attribute_t *template =
7033 /* create the object from the specified template */
7035 template, attr_count,
7061 * Add the attributes specified by the template to the
7126 type = template[tmpl_idx].oa_type;
7129 template[tmpl_idx].oa_value_len = -1;
7136 template[tmpl_idx].oa_value_len = -1;
7146 template[tmpl_idx].oa_value_len = -1;
7151 tlen = template[tmpl_idx].oa_value_len;
7154 if (template[tmpl_idx].oa_value == NULL) {
7162 template[tmpl_idx].oa_value_len = olen;
7167 template[tmpl_idx].oa_value_len = -1;
7173 bzero(template[tmpl_idx].oa_value, tlen);
7182 &template[tmpl_idx].oa_value[offset], olen);
7186 template[tmpl_idx].oa_value_len = olen;
7194 * Add the attributes specified by the template to the
7221 if (!dprov_attributes_match(object, template,
7226 /* session object attributes matches template */
7247 if (!dprov_attributes_match(object, template,
7332 * Copy attribute values into a template. RSA values are precomputed.
7335 nostore_copy_attribute(crypto_object_attribute_t *template, uint_t count,
7368 error = dprov_get_template_attr_array(template, count, attr_type,
7377 * The updated template will be returned to libpkcs11.
7427 crypto_object_attribute_t *template;
7436 template = taskq_req->dr_key_req.kr_template;
7442 (void) dprov_get_template_attr_ulong(template, attribute_count,
7446 (void) dprov_get_template_attr_ulong(template, attribute_count,
7478 if (dprov_get_template_attr_ulong(template,
7498 if (dprov_get_template_attr_ulong(template,
7517 if (dprov_get_template_attr_ulong(template,
7540 template, attribute_count, object_id_ptr, B_FALSE, B_TRUE);
7926 crypto_object_attribute_t *template;
7929 template = taskq_req->dr_key_req.kr_template;
7934 if (dprov_get_template_attr_ulong(template, attribute_count,
7996 template, attribute_count, object_id_ptr, B_FALSE, B_FALSE);
8046 crypto_object_attribute_t *template;
8054 template = taskq_req->dr_key_req.kr_template;
8059 if (dprov_get_template_attr_ulong(template, attribute_count,
8103 (void) dprov_get_template_attr_array(template, attribute_count,
8184 template, attribute_count, object_id_ptr, B_FALSE, B_FALSE);
8421 * CKA_VALUE is added to the derived key template by
8998 * Given the given object template and session, return whether
8999 * an object can be created from that template according to the
9005 crypto_object_attribute_t *template, uint_t nattr,
9013 error = dprov_get_template_attr_boolean(template, nattr,
9027 if (dprov_get_template_attr_ulong(template, nattr, DPROV_CKA_CLASS,
9036 if (!dprov_template_attr_present(template, nattr,
9044 if (dprov_get_template_attr_ulong(template, nattr,
9047 if (!dprov_template_attr_present(template,
9049 !dprov_template_attr_present(template,
9055 if (dprov_template_attr_present(template, nattr,
9065 if (dprov_get_template_attr_ulong(template, nattr,
9068 if (!dprov_template_attr_present(template,
9074 template, nattr,
9086 if (!dprov_template_attr_present(template, nattr,
9093 if (dprov_template_attr_present(template, nattr,
9103 * Create an object from the specified template. Checks whether the
9111 dprov_session_t *session, crypto_object_attribute_t *template,
9134 if ((error = dprov_template_can_create(session, template,
9146 error = dprov_get_template_attr_boolean(template, nattr,
9174 /* initialize object from template */
9176 if (template[attr].oa_value == NULL)
9178 type = template[attr].oa_type;
9179 old_len = template[attr].oa_value_len;
9201 bcopy(&template[attr].oa_value[offset],
9249 crypto_object_attribute_t *template, uint_t nattr)
9253 int ta_idx; /* template attribute index */
9257 /* no value for template attribute */
9258 if (template[ta_idx].oa_value == NULL)
9262 type = template[ta_idx].oa_type;
9269 tlen = template[ta_idx].oa_value_len;
9281 if (bcmp(&template[ta_idx].oa_value[diff],
9323 crypto_object_attribute_t *template, uint_t nattr)
9336 if (dprov_template_attr_present(template, nattr,
9338 dprov_template_attr_present(template, nattr,
9345 if (dprov_template_attr_present(template, nattr,
9351 if (dprov_template_attr_present(template, nattr,
9353 dprov_template_attr_present(template, nattr,
9359 if (dprov_template_attr_present(template, nattr,
9361 dprov_template_attr_present(template, nattr,
9374 * Set the attributes specified by the template in the specified object,
9379 crypto_object_attribute_t *template, uint_t nattr,
9392 /* verify that attributes in the template can be modified */
9393 if ((error = dprov_object_can_modify(object, template, nattr))
9398 /* go through the attributes specified in the template */
9400 if (template[i].oa_value == NULL)
9404 type = template[i].oa_type;
9421 old_len = template[i].oa_value_len;
9426 bcopy(&template[i].oa_value[old_len - new_len],
9599 dprov_get_template_attr_scalar_common(crypto_object_attribute_t *template,
9606 if ((attr_idx = dprov_find_attr(template, nattr, attr_type)) == -1)
9609 oa_value_len = template[attr_idx].oa_value_len;
9632 bcopy(template[attr_idx].oa_value, (uchar_t *)value + offset,
9639 * Get the value of the a boolean attribute from the specified template
9642 dprov_get_template_attr_boolean(crypto_object_attribute_t *template,
9649 ret = dprov_get_template_attr_scalar_common(template, nattr,
9658 * Get the value of a ulong_t attribute from the specified template.
9661 dprov_get_template_attr_ulong(crypto_object_attribute_t *template,
9664 return (dprov_get_template_attr_scalar_common(template, nattr,
9669 dprov_template_attr_present(crypto_object_attribute_t *template,
9672 return (dprov_find_attr(template, nattr,
9678 * the specified template. Returns CRYPTO_SUCCESS on success or
9682 dprov_get_template_attr_array(crypto_object_attribute_t *template,
9687 if ((attr_idx = dprov_find_attr(template, nattr, attr_type)) == -1)
9690 *array = template[attr_idx].oa_value;
9691 *len = template[attr_idx].oa_value_len;