Jarek wrote:
Hi all!
I've some BER encoded data with strange sequence making problems for my
application. I'd like to know if this is legal from ASN.1 BER point of
view:
A3 80 30 00 00 00
The specification for this is:
.
.
.
CHOICE {
[3] SEQUENCE OF VisibleString,
[4] VisibleString
},
.
.
This "A3 80 30 00 00 00" encoding is absolutely correct. It describes
the empty SEQUENCE OF with definite length encoding, wrapped up with
the tag "[3]", which has indefinite length encoding.
A3 80 ; Constructed [3], indefinite length
30 00 ; Constructed [UNIVERSAL 16] (SEQUENCE OF), definite.
00 00 ; end-of-content terminators for "A3 80".
> I know that for this specification, endcoding is wrong, but is is
> possible to modify specification, so the encoding will be right ?
You probably can request data to be encoded using DER encoding rules.
This way, the outer "[3]" tag will have definite length, which is
what probably causes problems with your application.
> (Change of encoding is almost impossible - manufacturer refusues all
> requests).
The BER encoded data above is correct. You would probably have to
fix your own code.
--
Lev Walkin
[EMAIL PROTECTED]
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1