pycrate_asn1rt: enable empty list for SEQ OF / SET OF value to be PER-encoded
This commit is contained in:
parent
b97609e996
commit
bbdbcc31e6
|
@ -2214,6 +2214,8 @@ class _CONSTRUCT_OF(ASN1Obj):
|
|||
#self._cont._val = None
|
||||
|
||||
def _to_per_ws(self):
|
||||
if not self._val:
|
||||
return []
|
||||
GEN, ldet = [], len(self._val)
|
||||
if self._const_sz:
|
||||
if self._const_sz.ext is not None:
|
||||
|
@ -2302,6 +2304,8 @@ class _CONSTRUCT_OF(ASN1Obj):
|
|||
self._struct = Envelope(self._name, GEN=tuple(GEN))
|
||||
|
||||
def _to_per(self):
|
||||
if not self._val:
|
||||
return []
|
||||
GEN, ldet = [], len(self._val)
|
||||
if self._const_sz:
|
||||
if self._const_sz.ext is not None:
|
||||
|
|
Loading…
Reference in New Issue