>       NoSize ::= NumericString
>       emptyNoSize NoSize ::= ""
>
>       SmallSize ::= NumericString SIZE(0..6)
>       emptySmallSize SmallSize ::= ""
>
> Both of these require a length determninate with value 0. There is of course
> nothing encoded for the string itself, but will the value for the next type
> be encoded on an octet boundary due to to the alignment requirements of this
> string type? I think not, and Bancroft point out NOTE 2 for 10.9.3.3/X.691
> which makes it clear. I just wanted to make sure that that note applies to
> my situation at hand.

In the case of NoSize, where the length (unconstrained) is itself one
octet long, the length is aligned, so one octet of 0 will be used, and it
ends there since the value needs no value.

In the case of SmallSize, where the length (constrained) is 3 bits long,
the length is not aligned, so 3 unaligned bits will be used. It also ends
there since the value needs no value.

Thus...

SEQUENCE {a NoSize, b NoSize, c NoSize}
where all three are empty will be encoded (in octets) 00 00 00.

SEQUENCE {a SmallSize, b SmallSize, c SmallSize}
where all three are empty will be encoded (in bits) 000 000 000.

Care to try encoding
SEQUENCE {a SmallSize, b NoSize, c SmallSize, d NoSize} again where all
strings are empty?

=====================================================================
Conrad Sigona                         Toll Free      : 1-888-OSS-ASN1
OSS Nokalva                           Voice Mail     : 1-732-302-9669 x400
[EMAIL PROTECTED]                        Fax            : 1-419-831-5035
http://www.oss.com                    My direct line : 1-315-845-1773

Reply via email to