Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
asn1rt: fix value filter for extended group in constructed objects
Browse files Browse the repository at this point in the history
  • Loading branch information
p1-bmu committed Feb 22, 2019
1 parent 33a4fe5 commit 1f27240
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pycrate_asn1rt/asnobj_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,14 @@ def _safechk_valcompl(self, val):
ext = [k for k in val if k in self._ext]
for e in ext:
if e in self._ext_ident:
for ident in self._ext_group[self._ext_ident[e]]:
if ident not in ext:
raise(ASN1ObjErr('{0}: missing extended value, {1!r}'\
.format(self.fullname(), val)))
else:
ext.remove(ident)
grp_id = self._ext_ident[e]
for ident, grp_comp in self._ext_group_obj[grp_id]._cont.items():
if not grp_comp._opt:
if ident not in ext:
raise(ASN1ObjErr('{0}: missing extended value for group {1}, {2!r}'\
.format(self.fullname(), grp_id, val)))
else:
ext.remove(ident)

def _safechk_bnd(self, val):
# TODO:
Expand Down

0 comments on commit 1f27240

Please sign in to comment.