Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!tut.cis.ohio-state.edu!ucbvax!CSL.SRI.COM!auerbach From: auerbach@CSL.SRI.COM (Karl Auerbach) Newsgroups: comp.protocols.iso Subject: An ASN.1 question Message-ID: <8906051632.AA00970@Hercules.csl.sri.com> Date: 5 Jun 89 16:32:21 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31 Hi -- My original posting of this seems to have gone astray (it will certainly pop-up seconds after I do this reposting. Such are the whims of the network gods.) Last night I was playing about with my ASN.1 tools (my own, not those in ISODE) and I tried something with surprising results. What I did was this: I added an encoding strategy flag, much like PS_LEN_INDF in ISODE which (in my code) is supposed to mean "whenever legally possible use indefinite length encoding." What happened, and what I am not sure is legal, is that everything that has an explicit tag got an indefinite length encoding. For example, [12] INTEGER with a value of 127 came out encoded as: [12] LENGTH INTEGER LENGTH CONTENTS END-OF-CONTENTS AC 80 02 01 7F 00 00 I find ISO 8825 to be a bit ambiguous on this point: Section 6.3.2 (b) and (c) seem to say that anything that is constructued can be done with indefinite length. But section 18.2 (regarding non-implicit tags) says that the "contents octets shall be the complete base encoding." (A very restrictive reading of that could mean "the complete base encoding and nothing more -- such as end-of-contents".) Anyway, I'd sure like to hear whether the form I generated is legal. --karl--