🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.iso
Article #784

Re: Declaring bounded arrays of bytes

#784
From: Julian Onions
Date: Mon, 08 Oct 1990 07:00
27 lines
1325 bytes
> 	I've got a quick ASN.1 question that I hope someone can answer for me.
> I'm trying to define a bounded array of OCTETs using ASN.1 syntax and I wonde
r
> if the following is the ``correct'' way to accomplish this:
> 
> ----------------------------------------
> Foo DEFINITIONS ::=
> BEGIN
> 	Version-number ::= SEQUENCE SIZE (5) OF OCTET
> END
> ----------------------------------------
Nope

Firstly there is no such thing as OCTET defined in ASN.1 - OCTET
STRING is probably what you meant. In any case, and OCTET STRING is
defined as is a string of characters. This means the corrected above
would be a sequence of 5 strings - each string of arbitrary length. I
think what you want is something more like

	VersionNumber ::= OCTET STRING (SIZE (1..5))
 
This says VersionNumber is an OCTET STRING of between 0 and 6
characters long.

Hope this helps.
Julian.
Technical Details
Message-ID: <17678.655369212@cs.nott.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!computer-science.nottingham.ac.uk!j.onions
References: <1990Oct5.211901.12679@indetech.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!decwrl!ucbvax!computer-science.nottingham.ac.uk!j.onions
From: j.onions@computer-science.nottingham.ac.uk (Julian Onions)
Newsgroups: comp.protocols.iso
Subject: Re: Declaring bounded arrays of bytes
Message-ID: <17678.655369212@cs.nott.ac.uk>
Date: 8 Oct 90 07:00:12 GMT
References: <1990Oct5.211901.12679@indetech.com>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 27