asn1rt: fix bug in top level object decoding

This commit is contained in:
mitshell 2017-08-31 23:18:50 +02:00
parent 061d4af60f
commit 44a37e8b45
1 changed files with 2 additions and 2 deletions

View File

@ -848,7 +848,7 @@ class ASN1Obj(Element):
char = buf
# decode the whole char buffer into tag, length and value boundary
if single:
TLV = ASN1CodecBER.decode_single(char)
TLV = [ASN1CodecBER.decode_single(char)[0]]
else:
TLV = ASN1CodecBER.decode_all(char)
char_cur, char_lb = char._cur, char._len_bit
@ -955,7 +955,7 @@ class ASN1Obj(Element):
char = buf
# decode the whole char buffer into tag, length and value boundary
if single:
TLV = ASN1CodecBER.decode_single_ws(char)
TLV = [ASN1CodecBER.decode_single_ws(char)[0]]
else:
TLV = ASN1CodecBER.decode_all_ws(char)
char_cur, char_lb = char._cur, char._len_bit