|
Ed, I
think you're right on the point that size constraint must be respected but this
doesn't mean that the encoding (the bits that are effectively transmitted)
respects it in the case of BIT STRING with named bits. Actually, the decoder
must give a 'respecting constraint' value to the application. So, in the case of
Ulrich, the sender who has removed trailing '0' bits is rigth and the
decoder who issues an error because size is not respected in the encoding is
wrong. It is my understanding of ITU-T X.690 � 8.6.2.4 and � 11.2.2. In BER
nothing prevents the encoder to send a number of bits respecting the constraint
but in DER it is clearly forbidden. In both cases, the decoder has to decode
with no error and give a correct value to the application.
Bruno KONIK - uniGone Tel : +33 (0)1 60 12 77 64 Fax : +33
(0)1 60 12 77 65 41-43 rue de Cronstadt - 75015 PARIS FRANCE mailto:[EMAIL PROTECTED] URL
: http://www.unigone.com
-- uniGone
provides a complete environment for ASN.1 users : JAVA compiler, ASN.1 IP
analyzer, simulator... contact us for more information...
--
It is my opinion that the size constraint in
this case must be respected; otherwise, it has no meaning. Clearly, the
person who wrote this definition wanted the bit string to be between 15 and 32
bits in length, otherwise the size constraint would not have been added.
As to precise language in the standards stating this, I could not find
any.
Regards,
----- Original Message -----
Sent: Friday, February 28, 2003 4:27
AM
Subject: [ASN.1] Question on BER
Dear ASN.1
experts
In order to solve an
interoperability problem resulting from different interpretations of ITU-T
X.690, your help on the following question is very much
appreciated:
A BER encoded message contains a
data type for which the abstract syntax is defined as
DataType ::= BIT STRING
{
bitOne
(0),
bitTwo
(1),
bitThree
(2),
bitSeven
(6),
bitEight
(7),
bitNine
(8),
bitFour
(3),
bitFive
(4),
bitSix
(5),
bitTen
(9),
bitEleven
(10),
bitTwelve
(11),
bitThirteen
(12),
bitFourteen
(13),
bitFifteen
(14),
bitNineteen
(18),
bitTwenty
(19),
bitTwentyone
(20),
bitTwentytwo
(21),
bitTwentythree
(22),
bitTwentyfour
(23),
bitTwentyfive
(24),
bitTwentysix
(25),
bitTwentyseven
(26),
bitTwentyeight
(27),
bitTwentynine (28)}
(SIZE (15..32))
The entity sending the message
encodes this data type as:
03 TAG
02 length
00 no unused
bits
80 bitOne set to 1, bitTwo to
bitSeven set to 0
The entity receiving the message
does not accept it due to the SIZE constraint not being respected and
performs the appropriate error handling.
Now designers of the sending
entity argue that ITU-T X.690 � 8.6.2.4 and � 11.2.2 allow the encoder to
encode the data type as shown above whereas designers of the receiving
entity do not share this view and insist on the SIZE constraint being
respected.
Dear Experts,
please let me know which of the
above interpretations of ITU-T X.690 is correct and whether or not X.690 is
incompatible to X.209 in this respect.
Thank you in
advance
Ulrich Wiehe
GKS
AG
Gesellschaft f�r
Kommunikations
Software Tel:+496621
169139
MMC2
Fax:+49 6621 169 122
Breitenstr.
57
Mobil: +49 151 14016088
D-36251 Bad
Hersfeld
e-mail: [EMAIL PROTECTED]
|