asn1rt: fix BER encoding of non-extensible SET

This commit is contained in:
p1-bmu 2022-04-05 17:07:45 +02:00
parent c931e76f5f
commit f0f3e47392
1 changed files with 44 additions and 42 deletions

View File

@ -2521,6 +2521,7 @@ Specific attributes:
lval += comp_tlv.get_bl() >> 3
val_ids.remove(ident)
# encode extended component 1 by 1 in their definition order
if self._ext:
for ident in self._ext:
if ident in self._val:
if ASN1CodecBER.ENC_DEF_CANON and self._val[ident] == self._cont[ident]._def:
@ -2584,6 +2585,7 @@ Specific attributes:
lval += sum([f[2] for f in comp_tlv]) >> 3
val_ids.remove(ident)
# encode extended component 1 by 1 in their definition order
if self._ext:
for ident in self._ext:
if ident in self._val:
if ASN1CodecBER.ENC_DEF_CANON and self._val[ident] == self._cont[ident]._def: