asn1rt: fix BER tag matching when table lookup is disabled for OPEN object

This commit is contained in:
mich 2019-11-19 10:59:46 +01:00
parent 6ac3bf58d4
commit da520da8f3
2 changed files with 5 additions and 3 deletions

View File

@ -367,7 +367,6 @@ Single value: Python 2-tuple
if not self._SILENT:
asnlog('OPEN._decode_ber_cont_ws: %s, unable to retrieve a table-looked up object'\
% self.fullname())
Objs = []
elif const_obj_type == CLASET_UNIQ:
Objs = [const_obj]
else:
@ -462,7 +461,6 @@ Single value: Python 2-tuple
if not self._SILENT:
asnlog('OPEN._decode_ber_cont: %s, unable to retrieve a table-looked up object'\
% self.fullname())
Objs = []
elif const_obj_type == CLASET_UNIQ:
Objs = [const_obj]
else:

View File

@ -473,7 +473,7 @@ def match_tag(Obj, tag):
if ret:
return ret
else:
# const_obj_type == CLASET_MULT:
#const_obj_type == CLASET_MULT
for obj in const_obj:
ret = match_tag(obj, tag)
if ret:
@ -496,6 +496,10 @@ def match_tag(Obj, tag):
elif hasattr(Obj, '_defby') and Obj._defby is not None:
# DEFINED BY construction, not supported yet
return 5
else:
# OPEN / ANY internal content cannot be determined
# so we suppose we have a match
return 1
else:
# we should never come here
assert()