Lines Matching defs:template

264 soft_validate_attr(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
273 switch (template[i].type) {
275 *class = *((CK_OBJECT_CLASS*)template[i].pValue);
289 switch (template[i].type) {
310 rv = soft_lookup_attr(template[i].type);
446 soft_add_extra_attr(CK_ATTRIBUTE_PTR template, soft_object_t *object_p)
458 attrp->attr.type = template->type;
459 attrp->attr.ulValueLen = template->ulValueLen;
461 if ((template->pValue != NULL) &&
462 (template->ulValueLen > 0)) {
464 attrp->attr.pValue = malloc(template->ulValueLen);
470 (void) memcpy(attrp->attr.pValue, template->pValue,
471 template->ulValueLen);
584 * (if the specified attribute type is found), and copy it to a template.
585 * Note the type of the attribute to be copied is specified by the template,
586 * and the storage is pre-allocated for the attribute value in the template
590 get_extra_attr_from_object(soft_object_t *object_p, CK_ATTRIBUTE_PTR template)
594 CK_ATTRIBUTE_TYPE type = template->type;
610 template->ulValueLen = 0;
617 if (template->pValue == NULL) {
618 template->ulValueLen = extra_attr->attr.ulValueLen;
622 if (template->ulValueLen >= extra_attr->attr.ulValueLen) {
627 (void) memcpy(template->pValue, extra_attr->attr.pValue,
629 template->ulValueLen = extra_attr->attr.ulValueLen;
636 template->ulValueLen = (CK_ULONG)-1;
649 CK_ATTRIBUTE_PTR template)
671 return (soft_add_extra_attr(template, object_p));
675 if ((template->pValue != NULL) &&
676 (template->ulValueLen > 0)) {
677 if (template->ulValueLen > extra_attr->attr.ulValueLen) {
684 extra_attr->attr.pValue = malloc(template->ulValueLen);
691 extra_attr->attr.ulValueLen = template->ulValueLen;
692 (void) memcpy(extra_attr->attr.pValue, template->pValue,
693 template->ulValueLen);
703 * Copy the big integer attribute value from template to a biginteger_t struct.
706 get_bigint_attr_from_template(biginteger_t *big, CK_ATTRIBUTE_PTR template)
709 if ((template->pValue != NULL) &&
710 (template->ulValueLen > 0)) {
712 big->big_value = malloc(template->ulValueLen);
717 (void) memcpy(big->big_value, template->pValue,
718 template->ulValueLen);
719 big->big_value_len = template->ulValueLen;
731 * object to a template.
734 get_bigint_attr_from_object(biginteger_t *big, CK_ATTRIBUTE_PTR template)
737 if (template->pValue == NULL) {
738 template->ulValueLen = big->big_value_len;
743 template->ulValueLen = 0;
747 if (template->ulValueLen >= big->big_value_len) {
752 (void) memcpy(template->pValue, big->big_value,
754 template->ulValueLen = big->big_value_len;
761 template->ulValueLen = (CK_ULONG)-1;
769 * specified attribute to the template.
773 CK_ATTRIBUTE_PTR template)
776 if (template->pValue == NULL) {
777 template->ulValueLen = sizeof (CK_BBOOL);
781 if (template->ulValueLen >= sizeof (CK_BBOOL)) {
787 *((CK_BBOOL *)template->pValue) = B_TRUE;
789 *((CK_BBOOL *)template->pValue) = B_FALSE;
792 template->ulValueLen = sizeof (CK_BBOOL);
799 template->ulValueLen = (CK_ULONG)-1;
809 CK_ATTRIBUTE_PTR template)
812 if (*(CK_BBOOL *)template->pValue)
823 * template.
826 get_ulong_attr_from_object(CK_ULONG value, CK_ATTRIBUTE_PTR template)
829 if (template->pValue == NULL) {
830 template->ulValueLen = sizeof (CK_ULONG);
834 if (template->ulValueLen >= sizeof (CK_ULONG)) {
840 *(CK_ULONG_PTR)template->pValue = value;
841 template->ulValueLen = sizeof (CK_ULONG);
848 template->ulValueLen = (CK_ULONG)-1;
855 * Copy the CK_ULONG data type attribute value from a template to the
859 get_ulong_attr_from_template(CK_ULONG *value, CK_ATTRIBUTE_PTR template)
862 if (template->ulValueLen < sizeof (CK_ULONG))
865 if (template->pValue != NULL) {
866 *value = *(CK_ULONG_PTR)template->pValue;
994 * Copy the certificate attribute information to the template.
995 * If the template attribute is not big enough, set the ulValueLen=-1
999 get_cert_attr_from_object(cert_attr_t *src, CK_ATTRIBUTE_PTR template)
1001 if (template->pValue == NULL) {
1002 template->ulValueLen = src->length;
1004 } else if (template->ulValueLen >= src->length) {
1009 (void) memcpy(template->pValue, src->value, src->length);
1010 template->ulValueLen = src->length;
1017 template->ulValueLen = (CK_ULONG)-1;
1023 string_attr_cleanup(CK_ATTRIBUTE_PTR template)
1026 if (template->pValue) {
1027 free(template->pValue);
1028 template->pValue = NULL;
1029 template->ulValueLen = 0;
1248 * value to indicate if the supplied template specifies a valid attribute
1252 soft_parse_common_attrs(CK_ATTRIBUTE_PTR template, uchar_t *object_type)
1257 switch (template->type) {
1263 if ((*(CK_BBOOL *)template->pValue) == B_TRUE) {
1271 if ((*(CK_BBOOL *)template->pValue) == B_TRUE) {
1305 * - Parse the object's template, and when an error is detected such as
1320 soft_build_public_key_object(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
1374 switch (template[i].type) {
1378 keytype = *((CK_KEY_TYPE*)template[i].pValue);
1392 rv = soft_add_extra_attr(&template[i],
1410 if (*(CK_BBOOL *)template[i].pValue)
1415 if (*(CK_BBOOL *)template[i].pValue)
1422 if (*(CK_BBOOL *)template[i].pValue)
1429 if (*(CK_BBOOL *)template[i].pValue)
1436 if (*(CK_BBOOL *)template[i].pValue)
1443 if (*(CK_BBOOL *)template[i].pValue)
1448 if ((*(CK_BBOOL *)template[i].pValue) == B_FALSE)
1461 * Copyin big integer attribute from template
1465 &template[i]);
1485 &template[i]);
1493 &template[i]);
1501 &template[i]);
1509 &template[i]);
1517 if ((template[i].ulValueLen == 0) ||
1518 (template[i].pValue == NULL)) {
1525 &template[i]);
1533 &template[i]);
1541 &template[i]);
1548 rv = get_string_from_template(&param_tmp, &template[i]);
1556 &template[i]);
1562 rv = soft_parse_common_attrs(&template[i],
1590 * The key type specified in the template does not
1677 * if not not specified in attribute template.
1874 * - Parse the object's template, and when an error is detected such as
1889 soft_build_private_key_object(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
1959 switch (template[i].type) {
1962 keytype = *((CK_KEY_TYPE*)template[i].pValue);
1976 rv = soft_add_extra_attr(&template[i],
1997 if (*(CK_BBOOL *)template[i].pValue)
2002 if (*(CK_BBOOL *)template[i].pValue)
2007 if (*(CK_BBOOL *)template[i].pValue) {
2014 if (*(CK_BBOOL *)template[i].pValue)
2021 if (*(CK_BBOOL *)template[i].pValue)
2028 if (*(CK_BBOOL *)template[i].pValue)
2035 if (*(CK_BBOOL *)template[i].pValue)
2042 if (*(CK_BBOOL *)template[i].pValue)
2049 if ((*(CK_BBOOL *)template[i].pValue) == B_FALSE)
2062 * Copyin big integer attribute from template
2066 &template[i]);
2087 &template[i]);
2096 &template[i]);
2104 &template[i]);
2112 &template[i]);
2120 &template[i]);
2128 &template[i]);
2136 &template[i]);
2144 &template[i]);
2152 &template[i]);
2160 &template[i]);
2168 if ((template[i].ulValueLen == 0) ||
2169 (template[i].pValue == NULL)) {
2176 &template[i]);
2184 &template[i]);
2192 &template[i]);
2200 &template[i]);
2206 rv = soft_parse_common_attrs(&template[i],
2233 * template, so we use the implied key type based on
2240 /* If still unspecified, template is incomplete */
2247 * The key type specified in the template does not
2263 * specified from the attribute template (keytype), it is
2550 * - Parse the object's template, and when an error is detected such as
2566 soft_build_secret_key_object(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
2601 switch (template[i].type) {
2605 keytype = *((CK_KEY_TYPE*)template[i].pValue);
2616 rv = soft_add_extra_attr(&template[i],
2636 if (*(CK_BBOOL *)template[i].pValue)
2641 if (*(CK_BBOOL *)template[i].pValue)
2646 if (*(CK_BBOOL *)template[i].pValue)
2653 if (*(CK_BBOOL *)template[i].pValue)
2660 if (*(CK_BBOOL *)template[i].pValue)
2667 if (*(CK_BBOOL *)template[i].pValue)
2674 if (*(CK_BBOOL *)template[i].pValue)
2681 if (*(CK_BBOOL *)template[i].pValue)
2688 if (*(CK_BBOOL *)template[i].pValue)
2695 if ((*(CK_BBOOL *)template[i].pValue) == B_FALSE)
2702 if ((template[i].ulValueLen == 0) ||
2703 (template[i].pValue == NULL)) {
2710 * Copyin attribute from template
2714 &template[i]);
2722 &template[i]);
2730 &template[i]);
2736 rv = soft_parse_common_attrs(&template[i],
2751 * template. Otherwise, returns error.
2763 * template, so we use the implied key type based on
2770 * The key type specified in the template
2781 * match the one found in the template.
2800 * specified from the attribute template (keytype), it is
3214 * - Parse the object's template, and when an error is detected such as
3224 soft_build_domain_parameters_object(CK_ATTRIBUTE_PTR template,
3257 switch (template[i].type) {
3261 keytype = *((CK_KEY_TYPE*)template[i].pValue);
3280 * Copyin big integer attribute from template
3284 &template[i]);
3292 &template[i]);
3300 &template[i]);
3316 &template[i]);
3322 rv = soft_parse_common_attrs(&template[i],
3444 * - Parse the object's template, and when an error is detected such as
3450 soft_build_certificate_object(CK_ATTRIBUTE_PTR template,
3473 switch (template[i].type) {
3476 *((CK_CERTIFICATE_TYPE*)template[i].pValue);
3521 switch (template[i].type) {
3525 &template[i]);
3530 &template[i]);
3536 &template[i]);
3543 rv = soft_add_extra_attr(&template[i],
3547 if ((*(CK_BBOOL *)template[i].pValue) ==
3556 &template[i], &object_type);
3562 switch (template[i].type) {
3566 &template[i]);
3571 &template[i]);
3576 &string_tmp, &template[i]);
3583 rv = soft_add_extra_attr(&template[i],
3588 if ((*(CK_BBOOL *)template[i].pValue) ==
3597 &template[i], &object_type);
3634 * Validate the attribute types in the object's template. Then,
3636 * the object specified in the template.
3647 soft_build_object(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
3654 if (template == NULL) {
3658 /* Validate the attribute type in the template. */
3659 rv = soft_validate_attr(template, ulAttrNum, &class);
3674 rv = soft_build_public_key_object(template, ulAttrNum,
3679 rv = soft_build_private_key_object(template, ulAttrNum,
3684 rv = soft_build_secret_key_object(template, ulAttrNum,
3689 rv = soft_build_domain_parameters_object(template, ulAttrNum,
3694 rv = soft_build_certificate_object(template, ulAttrNum,
3709 * Validate the attribute types in the object's template. Then,
3711 * the object specified in the template.
3715 soft_build_key(CK_ATTRIBUTE_PTR template, CK_ULONG ulAttrNum,
3723 /* Validate the attribute type in the template. */
3724 if ((template != NULL) && (ulAttrNum != 0)) {
3725 rv = soft_validate_attr(template, ulAttrNum, &temp_class);
3732 * the class from the template ("temp_class") is not specified,
3741 /* If object class is still not specified, template is incomplete. */
3745 /* Class should match if specified in both parameters and template. */
3762 rv = soft_build_public_key_object(template, ulAttrNum,
3768 rv = soft_build_private_key_object(template, ulAttrNum,
3774 rv = soft_build_secret_key_object(template, ulAttrNum,
3786 rv = soft_build_domain_parameters_object(template, ulAttrNum,
3808 soft_get_common_attrs(soft_object_t *object_p, CK_ATTRIBUTE_PTR template,
3814 switch (template->type) {
3818 template));
3822 template->ulValueLen = sizeof (CK_BBOOL);
3823 if (template->pValue == NULL) {
3827 *((CK_BBOOL *)template->pValue) = B_TRUE;
3829 *((CK_BBOOL *)template->pValue) = B_FALSE;
3834 template->ulValueLen = sizeof (CK_BBOOL);
3835 if (template->pValue == NULL) {
3839 *((CK_BBOOL *)template->pValue) = B_TRUE;
3841 *((CK_BBOOL *)template->pValue) = B_FALSE;
3845 template->ulValueLen = sizeof (CK_BBOOL);
3846 if (template->pValue == NULL) {
3850 *((CK_BBOOL *)template->pValue) = B_FALSE;
3852 *((CK_BBOOL *)template->pValue) = B_TRUE;
3857 template));
3864 template->ulValueLen = (CK_ULONG)-1;
3876 soft_get_common_key_attrs(soft_object_t *object_p, CK_ATTRIBUTE_PTR template)
3879 switch (template->type) {
3883 template));
3892 template));
3897 LOCAL_BOOL_ON, template));
3901 DERIVE_BOOL_ON, template));
3905 template));
3919 CK_ATTRIBUTE_PTR template)
3925 switch (template->type) {
3933 template));
3938 ENCRYPT_BOOL_ON, template));
3942 VERIFY_BOOL_ON, template));
3946 VERIFY_RECOVER_BOOL_ON, template));
3950 WRAP_BOOL_ON, template));
3954 TRUSTED_BOOL_ON, template));
3963 OBJ_PUB_RSA_MOD(object_p), template));
3965 template->ulValueLen = (CK_ULONG)-1;
3972 OBJ_PUB_RSA_PUBEXPO(object_p), template));
3974 template->ulValueLen = (CK_ULONG)-1;
3981 OBJ_PUB_RSA_MOD_BITS(object_p), template));
3983 template->ulValueLen = (CK_ULONG)-1;
3991 OBJ_PUB_DSA_PRIME(object_p), template));
3995 OBJ_PUB_DH_PRIME(object_p), template));
3999 OBJ_PUB_DH942_PRIME(object_p), template));
4002 template->ulValueLen = (CK_ULONG)-1;
4010 OBJ_PUB_DSA_SUBPRIME(object_p), template));
4014 OBJ_PUB_DH942_SUBPRIME(object_p), template));
4017 template->ulValueLen = (CK_ULONG)-1;
4025 OBJ_PUB_DSA_BASE(object_p), template));
4029 OBJ_PUB_DH_BASE(object_p), template));
4033 OBJ_PUB_DH942_BASE(object_p), template));
4036 template->ulValueLen = (CK_ULONG)-1;
4042 OBJ_PUB_EC_POINT(object_p), template));
4048 OBJ_PUB_DSA_VALUE(object_p), template));
4052 OBJ_PUB_DH_VALUE(object_p), template));
4056 OBJ_PUB_DH942_VALUE(object_p), template));
4059 template->ulValueLen = (CK_ULONG)-1;
4070 rv = soft_get_common_key_attrs(object_p, template);
4072 rv = soft_get_common_attrs(object_p, template,
4092 CK_ATTRIBUTE_PTR template)
4107 switch (template->type) {
4115 template->ulValueLen = (CK_ULONG)-1;
4120 switch (template->type) {
4128 template));
4133 SENSITIVE_BOOL_ON, template));
4137 SECONDARY_AUTH_BOOL_ON, template));
4141 DECRYPT_BOOL_ON, template));
4145 SIGN_BOOL_ON, template));
4149 SIGN_RECOVER_BOOL_ON, template));
4153 UNWRAP_BOOL_ON, template));
4157 EXTRACTABLE_BOOL_ON, template));
4161 ALWAYS_SENSITIVE_BOOL_ON, template));
4165 NEVER_EXTRACTABLE_BOOL_ON, template));
4170 OBJ_PRI_RSA_MOD(object_p), template));
4172 template->ulValueLen = (CK_ULONG)-1;
4180 OBJ_PRI_RSA_PUBEXPO(object_p), template));
4182 template->ulValueLen = (CK_ULONG)-1;
4190 OBJ_PRI_RSA_PRIEXPO(object_p), template));
4192 template->ulValueLen = (CK_ULONG)-1;
4200 OBJ_PRI_RSA_PRIME1(object_p), template));
4202 template->ulValueLen = (CK_ULONG)-1;
4210 OBJ_PRI_RSA_PRIME2(object_p), template));
4212 template->ulValueLen = (CK_ULONG)-1;
4220 OBJ_PRI_RSA_EXPO1(object_p), template));
4222 template->ulValueLen = (CK_ULONG)-1;
4230 OBJ_PRI_RSA_EXPO2(object_p), template));
4232 template->ulValueLen = (CK_ULONG)-1;
4240 OBJ_PRI_RSA_COEF(object_p), template));
4242 template->ulValueLen = (CK_ULONG)-1;
4250 OBJ_PRI_DH_VAL_BITS(object_p), template));
4252 template->ulValueLen = (CK_ULONG)-1;
4261 OBJ_PRI_DSA_PRIME(object_p), template));
4265 OBJ_PRI_DH_PRIME(object_p), template));
4269 OBJ_PRI_DH942_PRIME(object_p), template));
4272 template->ulValueLen = (CK_ULONG)-1;
4280 OBJ_PRI_DSA_SUBPRIME(object_p), template));
4284 OBJ_PRI_DH942_SUBPRIME(object_p), template));
4287 template->ulValueLen = (CK_ULONG)-1;
4295 OBJ_PRI_DSA_BASE(object_p), template));
4299 OBJ_PRI_DH_BASE(object_p), template));
4303 OBJ_PRI_DH942_BASE(object_p), template));
4306 template->ulValueLen = (CK_ULONG)-1;
4314 OBJ_PRI_DSA_VALUE(object_p), template));
4318 OBJ_PRI_DH_VALUE(object_p), template));
4322 OBJ_PRI_DH942_VALUE(object_p), template));
4326 OBJ_PRI_EC_VALUE(object_p), template));
4329 template->ulValueLen = (CK_ULONG)-1;
4340 rv = soft_get_common_key_attrs(object_p, template);
4342 rv = soft_get_common_attrs(object_p, template,
4362 CK_ATTRIBUTE_PTR template)
4368 switch (template->type) {
4373 SENSITIVE_BOOL_ON, template));
4377 ENCRYPT_BOOL_ON, template));
4381 DECRYPT_BOOL_ON, template));
4385 SIGN_BOOL_ON, template));
4389 VERIFY_BOOL_ON, template));
4393 WRAP_BOOL_ON, template));
4397 UNWRAP_BOOL_ON, template));
4401 EXTRACTABLE_BOOL_ON, template));
4405 ALWAYS_SENSITIVE_BOOL_ON, template));
4409 NEVER_EXTRACTABLE_BOOL_ON, template));
4420 template->ulValueLen = (CK_ULONG)-1;
4434 if (template->type == CKA_VALUE_LEN) {
4437 template));
4441 template));
4444 template->ulValueLen = (CK_ULONG)-1;
4457 rv = soft_get_common_key_attrs(object_p, template);
4459 rv = soft_get_common_attrs(object_p, template,
4476 CK_ATTRIBUTE_PTR template)
4482 switch (template->type) {
4486 template));
4490 LOCAL_BOOL_ON, template));
4496 OBJ_DOM_DSA_PRIME(object_p), template));
4500 OBJ_DOM_DH_PRIME(object_p), template));
4504 OBJ_DOM_DH942_PRIME(object_p), template));
4507 template->ulValueLen = (CK_ULONG)-1;
4515 OBJ_DOM_DSA_SUBPRIME(object_p), template));
4519 OBJ_DOM_DH942_SUBPRIME(object_p), template));
4522 template->ulValueLen = (CK_ULONG)-1;
4530 OBJ_DOM_DSA_BASE(object_p), template));
4534 OBJ_DOM_DH_BASE(object_p), template));
4538 OBJ_DOM_DH942_BASE(object_p), template));
4541 template->ulValueLen = (CK_ULONG)-1;
4549 OBJ_DOM_DSA_PRIME_BITS(object_p), template));
4553 OBJ_DOM_DH_PRIME_BITS(object_p), template));
4557 OBJ_DOM_DH942_PRIME_BITS(object_p), template));
4560 template->ulValueLen = (CK_ULONG)-1;
4568 OBJ_DOM_DH942_SUBPRIME_BITS(object_p), template));
4571 template->ulValueLen = (CK_ULONG)-1;
4579 rv = soft_get_common_attrs(object_p, template,
4594 CK_ATTRIBUTE_PTR template)
4599 switch (template->type) {
4603 X509_CERT_SUBJECT(object_p), template));
4609 X509_CERT_VALUE(object_p), template));
4612 X509_ATTR_CERT_VALUE(object_p), template));
4618 X509_ATTR_CERT_OWNER(object_p), template));
4624 return (get_cert_attr_from_object(&src, template));
4629 TRUSTED_BOOL_ON, template));
4636 template));
4640 return (soft_get_common_attrs(object_p, template,
4655 CK_ATTRIBUTE_PTR template, boolean_t copy)
4659 switch (template->type) {
4681 template->type, template));
4688 template->type, template));
4694 template->type, template));
4699 object_p, template, copy));
4718 soft_get_attribute(soft_object_t *object_p, CK_ATTRIBUTE_PTR template)
4726 rv = soft_get_public_key_attribute(object_p, template);
4730 rv = soft_get_private_key_attribute(object_p, template);
4734 rv = soft_get_secret_key_attribute(object_p, template);
4738 rv = soft_get_domain_parameters_attribute(object_p, template);
4742 rv = soft_get_certificate_attribute(object_p, template);
4751 template->ulValueLen = (CK_ULONG)-1;
4761 CK_ATTRIBUTE_PTR template, boolean_t copy)
4766 switch (template->type) {
4770 if ((*(CK_BBOOL *)template->pValue) == B_TRUE) {
4783 if ((*(CK_BBOOL *)template->pValue) == B_TRUE) {
4809 if ((*(CK_BBOOL *)template->pValue) == TRUE)
4837 CK_ATTRIBUTE_PTR template, boolean_t copy)
4840 switch (template->type) {
4848 CKA_LABEL, template));
4852 CKA_ID, template));
4856 CKA_START_DATE, template));
4860 CKA_END_DATE, template));
4864 DERIVE_BOOL_ON, template));
4873 template, copy));
4888 CK_ATTRIBUTE_PTR template, boolean_t copy)
4892 switch (template->type) {
4896 CKA_SUBJECT, template));
4900 ENCRYPT_BOOL_ON, template));
4904 VERIFY_BOOL_ON, template));
4908 VERIFY_RECOVER_BOOL_ON, template));
4912 WRAP_BOOL_ON, template));
4941 template, copy));
4960 CK_ATTRIBUTE_PTR template, boolean_t copy)
4964 switch (template->type) {
4968 CKA_SUBJECT, template));
4974 if (((*(CK_BBOOL *)template->pValue) == B_FALSE) &&
4979 if (*(CK_BBOOL *)template->pValue)
4985 DECRYPT_BOOL_ON, template));
4989 SIGN_BOOL_ON, template));
4993 SIGN_RECOVER_BOOL_ON, template));
4997 UNWRAP_BOOL_ON, template));
5003 if ((*(CK_BBOOL *)template->pValue) &&
5008 if ((*(CK_BBOOL *)template->pValue) == B_FALSE)
5050 template, copy));
5068 CK_ATTRIBUTE_PTR template, boolean_t copy)
5072 switch (template->type) {
5078 if (((*(CK_BBOOL *)template->pValue) == B_FALSE) &&
5083 if (*(CK_BBOOL *)template->pValue)
5089 ENCRYPT_BOOL_ON, template));
5093 DECRYPT_BOOL_ON, template));
5097 SIGN_BOOL_ON, template));
5101 VERIFY_BOOL_ON, template));
5105 WRAP_BOOL_ON, template));
5109 UNWRAP_BOOL_ON, template));
5115 if ((*(CK_BBOOL *)template->pValue) &&
5120 if ((*(CK_BBOOL *)template->pValue) == B_FALSE)
5140 template, copy));
5163 soft_set_attribute(soft_object_t *object_p, CK_ATTRIBUTE_PTR template,
5173 rv = soft_set_public_key_attribute(object_p, template, copy);
5177 rv = soft_set_private_key_attribute(object_p, template, copy);
5181 rv = soft_set_secret_key_attribute(object_p, template, copy);
5185 switch (template->type) {
5193 CKA_LABEL, template));
5198 rv = soft_set_certificate_attribute(object_p, template, copy);
5203 * If the template specifies a value of an attribute
6417 * attributes on template .
6420 * of these attributes are in the template, make a list of classes
6550 CK_ULONG num_pclasses, CK_ATTRIBUTE *template, CK_ULONG num_attr)
6582 tmpl_attr = &(template[i]);
7116 * this case, it only matches the template's
7117 * attribute if the template's value length