Article View: comp.protocols.iso
Article #1304Re: Question on ASN.1 Encodings
From: Erik Naggum
Date: Fri, 20 Nov 1992 17:35
Date: Fri, 20 Nov 1992 17:35
49 lines
2283 bytes
2283 bytes
Steve,
The variable length encoding of the basic encoding rules can only be
used for constructed types. X.209(88) (== ISO 8825:1987) 6.3.2 reads:
A sender shall
a) use the definite form if the encoding is primitive;
b) use either the definite form or the indefinite form, a sender's
option, if the encoding is constructed and all immediately
available;
c) use the indefinite form if the encoding is contructed and is not
all immediately available.
Since the constructed encodings ultimately have objectes with primitive
encoding as their constituents, your problem never arises.
In your particular case, you can choose the primitive encoding:
03 06 00 09 00 00 00 09
-- -- -- --------------
| | | |
| | | +-- contents
| | +----------------- number of residual bits in last octet
| +-------------------- definite form, length of content
+----------------------- universal, primitive, bit string
or constructed:
23 80 03 06 00 09 00 00 00 09 00 00
-- -- ----------------------- -----
| | | |
| | | +-- end of contents marker
| | +-------- contents of constructed
| | encoding (see above!)
| +-------------------------------- indefinite form
+----------------------------------- universal, constructed,
bit string
Hope this helps.
</Erik>
--
Erik Naggum : ISO 8879 SGML : +47 295 0313
: ISO 10744 HyTime :
<erik@naggum.no> : ISO 10646 UCS : Memento, terrigena.
<enag@ifi.uio.no> : ISO 9899 C : Memento, vita brevis.
Technical Details
Message-ID:
<19921120.004@erik.naggum.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enagReferences:
<1drej9INN8t8@svcase.sp.paramax.com> <1drgg8INN90p@svcase.sp.paramax.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.protocols.iso Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enag From: Erik Naggum <enag@ifi.uio.no> Message-ID: <19921120.004@erik.naggum.no> Date: 20 Nov 1992 18:35:04 +0100 References: <1drej9INN8t8@svcase.sp.paramax.com> <1drgg8INN90p@svcase.sp.paramax.com> Subject: Re: Question on ASN.1 Encodings Lines: 44