asn1: Basic validation of objects / object sets

- Validate that required value fields have values specified in objects

 - Validate that unique value fields have unique values within any
   object set
This commit is contained in:
Nicolas Williams
2021-02-26 14:48:22 -06:00
parent d128597cf7
commit 7f941b220b
4 changed files with 61 additions and 10 deletions

View File

@@ -689,7 +689,7 @@ objid_cmp(struct objid *oida, struct objid *oidb)
return -1;
}
static int
int
object_cmp(const void *va, const void *vb)
{
const IOSObject *oa = *(const IOSObject * const *)va;
@@ -727,8 +727,6 @@ sort_object_set(IOSObjectSet *os, /* Object set to sort fields of */
IOSObject *o;
size_t i, nobjs = 0;
/* FIXME: This would be a good place to check field UNIQUE constraints */
HEIM_TAILQ_FOREACH(o, os->objects, objects) {
ObjectField *typeidobjf = NULL;
ObjectField *of;