Hello, No, because no value can be encoded 00 00 in BER! This would mean a "00" universal tag and this is not possible (indeed the tag has been reserved).
Bruno KONIK - uniGone 41-43 rue de Cronstadt 75015 PARIS web : http://www.unigone.com phone : +33 (0) 1 60 12 77 64 fax : +33 (0) 1 60 12 77 65 mailto:[EMAIL PROTECTED] -- uniGone provides Java and c# tools for ASN.1 users, contact us for more information -- > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De > la part de Banibrata Dutta > Envoyé : mardi 13 septembre 2005 11:07 > À : 'Lev Walkin' > Cc : [email protected] > Objet : RE: [ASN1] question about indefinite encoding in BER > > Hi, > > This is the reincarnation of an old question posted to this group. > If I am using indefinite form of encoding, and my value > itself needs to contain "00 00", then isn't the decoder > confused when it sees the "00 00", as it could mean that it's > the terminal marking end-of-value, or a part of the value ? > > regards, > bdutta > > -----Original Message----- > From: Lev Walkin [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 27, 2005 9:01 AM > To: Banibrata Dutta > Cc: [email protected] > Subject: Re: [ASN1] question about indefinite encoding in BER > > Banibrata Dutta wrote: > > > Hi, > > > > My question is about indefinite form of encoding in BER. > > > > I believe the TLV = (0x00 0x00) form a regular acceptable > TLV, and can > > also serve as a termination-indicator in case of indefinite > encoding. > > Consider the example:- > > > > ( T1 L1 (T2 L2 V2) (T3 L3 V3) (00 00) (00 00) ) (T4 L4 V4) > > > > ^ > > ( T1 L1 (T2 L2 V2) (T3 L3 V3) (00 00) ) (00 00) (T4 L4 V4) > > > > > ^ where L1 = 0x80. > > > > Which one of the above two cases is legal ? > > If neither L2 nor L3 have indefinite length form (and they > both have definite form, judging from your way of putting > braces around the TLV tuples), then the second case is legal. > > The indefinite form basically pushes the expectation of > end-of-content octets to the decoding stack. Every time the > next TLV at the T1 level is found, it is checked whether it > is end-of-content sequence. The first end-of-content bytes at > the T1 level will serve as a terminator for the T1 sequence. > Please note that if T2 or T3 have indefinite length forms, > they would "eat" > the end-of-content octets closest to them: > > T1 iL1 ; indefinite form > T2 iL2 ; indefinite form > ... > 00 00 ; terminates T2! > T3 L3 ; definite form > V3 > 00 00 ; terminates T1! > > > > -- > Lev Walkin > [EMAIL PROTECTED] > > > > _______________________________________________ > ASN1 mailing list > [email protected] > http://lists.asn1.org/mailman/listinfo/asn1 > -------------------------------------------------------------- > ------------------------- > Wanadoo vous informe que cet e-mail a ete controle par > l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
