@@ -599,7 +599,7 @@ def build(self, pkt):
599599 elif val is None :
600600 s = b""
601601 else :
602- s = b"" .join (raw (i ) for i in val )
602+ s = b"" .join (bytes (i ) for i in val )
603603 return self .i2m (pkt , s )
604604
605605 def i2repr (self , pkt , x ):
@@ -769,7 +769,7 @@ def i2m(self, pkt, x):
769769 if x is None :
770770 s = b""
771771 else :
772- s = raw (x )
772+ s = bytes (x )
773773 if hash (type (x )) in self .pktchoices :
774774 imp , exp = self .pktchoices [hash (type (x ))]
775775 s = BER_tagging_enc (s ,
@@ -852,11 +852,12 @@ def i2m(self,
852852 s = x
853853 elif isinstance (x , ASN1_Object ):
854854 if x .val :
855- s = raw (x .val )
855+ print (repr (x ), repr (x .val ), self .name )
856+ s = bytes (x .val )
856857 else :
857858 s = b""
858859 else :
859- s = raw (x )
860+ s = bytes (x )
860861 if not hasattr (x , "ASN1_root" ):
861862 # A normal Packet (!= ASN1)
862863 return s
@@ -897,7 +898,7 @@ def __init__(self,
897898 self .cls = cls
898899 super (ASN1F_BIT_STRING_ENCAPS , self ).__init__ ( # type: ignore
899900 name ,
900- default and raw (default ),
901+ default and bytes (default ),
901902 context = context ,
902903 implicit_tag = implicit_tag ,
903904 explicit_tag = explicit_tag
0 commit comments