Lines Matching defs:pTemplate
776 process_object_attributes(CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
802 switch (pTemplate[i].type) {
809 if (pTemplate[i].pValue != NULL &&
810 (pTemplate[i].ulValueLen < value_len)) {
817 value_len = pTemplate[i].ulValueLen;
820 cur_attr->oa_type = pTemplate[i].type;
824 if ((pTemplate[i].pValue != NULL) &&
825 (pTemplate[i].ulValueLen > 0)) {
826 ptr = malloc(pTemplate[i].ulValueLen);
832 (void) memcpy(ptr, pTemplate[i].pValue,
833 pTemplate[i].ulValueLen);
839 (pTemplate[i].type == CKA_TOKEN)) {
841 if (pTemplate[i].pValue == NULL) {
847 *(CK_BBOOL *)pTemplate[i].pValue;
872 * Copy the attribute values from obj_attrs to pTemplate.
876 * in pTemplate.
879 get_object_attributes(CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
889 if (pTemplate[i].type != cur_attr->oa_type) {
895 pTemplate[i].ulValueLen = cur_attr->oa_value_len;
897 if ((pTemplate[i].pValue != NULL) &&
898 ((CK_LONG)pTemplate[i].ulValueLen != -1)) {
899 (void) memcpy(pTemplate[i].pValue, cur_attr->oa_value,
900 pTemplate[i].ulValueLen);
948 CK_ATTRIBUTE pTemplate[2];
959 pTemplate[0].type = CKA_PRIVATE;
960 pTemplate[0].pValue = &pri_value;
961 pTemplate[0].ulValueLen = sizeof (pri_value);
962 pTemplate[1].type = CKA_TOKEN;
963 pTemplate[1].pValue = &token_value;
964 pTemplate[1].ulValueLen = sizeof (token_value);
965 rv = process_object_attributes(pTemplate, 2, &obj_ga.og_attributes,
983 rv = get_object_attributes(pTemplate, 2, obj_ga.og_attributes);
985 is_pri_obj = *(CK_BBOOL *)pTemplate[0].pValue;
986 is_token_obj = *(CK_BBOOL *)pTemplate[1].pValue;