CK_RV counter_check_required_attributes(TEMPLATE *tmpl, CK_ULONG mode) { CK_ATTRIBUTE *attr = NULL; CK_BBOOL found; if (mode == MODE_CREATE) { found = template_attribute_find(tmpl, CKA_VALUE, &attr); if (! found) { return (CKR_TEMPLATE_INCOMPLETE); } found = template_attribute_find(tmpl, CKA_HAS_RESET, &attr); if (! found) { return (CKR_TEMPLATE_INCOMPLETE); } found = template_attribute_find(tmpl, CKA_RESET_ON_INIT, &attr); if (! found) { return (CKR_TEMPLATE_INCOMPLETE); } } return (hwf_object_check_required_attributes(tmpl, mode)); }
CK_RV clock_check_required_attributes( TEMPLATE *tmpl, CK_ULONG mode ) { CK_ATTRIBUTE *attr = NULL; CK_BBOOL found; if (mode == MODE_CREATE){ found = template_attribute_find( tmpl, CKA_VALUE, &attr ); if (!found) { OCK_LOG_ERR(ERR_TEMPLATE_INCOMPLETE); return CKR_TEMPLATE_INCOMPLETE; } } return hwf_object_check_required_attributes( tmpl, mode ); }