Re: [ASN.1] BER/DER encoding of a Set

2001-06-21 Thread Bancroft Scott
On Thu, 21 Jun 2001, Benoit POSTE wrote: Bancroft Scott wrote: snip I don't have X.680 handy at the moment, but if you check the docs you will see that SET requires that new extension additions MUST use tags that are canonically greater than any other existing tag in the SET, so

Re: [ASN.1] BER/DER encoding of a Sequence

2001-06-21 Thread Olivier Dubuisson
Benoit POSTE wrote: Hello again all, This time I am struggling with the encoding of a SEQUENCE in DER. Maybe my only problem is that I began with the complexity of PER, and thus feeling a bit lost in the simplicity of DER encoding ;). First, in the case of a two part

[ASN.1] Tag value for SEQUENCE OF sequence_type

2001-06-21 Thread Konduru, Chandra
Hi, I have a question on SEQUENCE OF tagging. I have the following ASN.1 BER definition: MY_DEF DEFINITIONS IMPLICIT TAGS ::= BEGIN X ::= [15] SEQUENCE OF Y; Y ::= SEQUENCE { a INTEGER; b OCTET STRING; } END In the above definition IMPLICIT global tagging is used. My

Re: [ASN.1] Tag value for SEQUENCE OF sequence_type

2001-06-21 Thread Bancroft Scott
On Thu, 21 Jun 2001, Konduru, Chandra wrote: Hi, I have a question on SEQUENCE OF tagging. I have the following ASN.1 BER definition: MY_DEF DEFINITIONS IMPLICIT TAGS ::= BEGIN X ::= [15] SEQUENCE OF Y; Y ::= SEQUENCE { a INTEGER; b OCTET STRING; } END

[ASN.1] Question on nested CHOICE types

2001-06-21 Thread Konduru, Chandra
Hi, I have the following definition: MY_DEF DEFINITIONS IMPLICIT TAGS ::= BEGIN SGSN_PDP_RECORD ::= SET { ... servedPdpAddr [10] PDP_Address ... } PDP_Address ::= CHOICE { ipAddr [0] IP_Addr, etsiAddr[1] OCTET STRING (SIZE(1..20)) }

RE: [ASN.1] Tag value for SEQUENCE OF sequence_type

2001-06-21 Thread Ambarish Malpani
Hi Chandra, You use 15 for the outer SEQUENCE OF and 0x30 for the SEQUENCE. For example, if you had 2 Y's in X, which had the integers 1 and 2, and an OCTET STRING of length 0 for each of the OCTET STRING, then encoding in DER would be: 0x9f, 0xe -- My encoding for the