Rick Berge wrote:
Bertil Karlsson wrote:
Hello,
I wonder if someone knows the right BER encoding of the following
example:
Seq ::= SEQUENCE{
a [PRIVATE 1] IMPLICIT OCTET STRING
}
If the component is encoded with value 1,2,3 (three octets) in
constructed form what would
the encoding of the inner OCTET STRING be?
Which of the following is right for Seq?
a 48,7,225,5,4,3,1,2,3 [UNIVERSAL 4] as inner tag
b 48,7,225,5,193,3,1,2,3 [PRIVATE 1] as inner tag
Lev Walkin wrote:
Second form is correct.
...but unless I'm missing something, you have an extra tag (225) between
SEQUENCE (48) and [PRIVATE 1] (193).
You are missing something. The constructed [private 1](225) is not
necessary, as there is a primitive [private 1] (193). It is would
be necessary only in case of nested tags, which is not the case.
--
Lev Walkin
[EMAIL PROTECTED]
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1