From 4c7bb784814829e7e9208df2e540acb658b6e135 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 26 Feb 2025 14:33:30 -0500 Subject: [PATCH] options have to have class Context --- src/protocols/der/base.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocols/der/base.c b/src/protocols/der/base.c index 3fdf90aa36..2707033fb2 100644 --- a/src/protocols/der/base.c +++ b/src/protocols/der/base.c @@ -884,6 +884,8 @@ static bool attr_valid(fr_dict_attr_t *da) flags->option = da->attr; } + flags->class = FR_DER_CLASS_CONTEXT; + if ((parent->restrictions & (1 << flags->option)) != 0) { fr_strerror_printf("Parent %s already has a child with option %u - duplicates are not allowed", da->parent->name, flags->option); @@ -895,6 +897,8 @@ static bool attr_valid(fr_dict_attr_t *da) } else if (parent->is_sequence_of && (parent->sequence_of == FR_DER_TAG_CHOICE)) { fr_assert(flags->der_type < FR_DER_TAG_VALUE_MAX); + flags->class = FR_DER_CLASS_CONTEXT; + if ((parent->restrictions & (1 << flags->der_type)) != 0) { fr_strerror_printf("Parent %s already has a child with tag %s - duplicates are not allowed", da->parent->name, fr_der_tag_to_str(flags->der_type)); -- 2.47.3