~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/asn1/test/asn1_SUITE_data/TConstr.asn1

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- The idea with this spec is to gather definitions that has a
 
2
-- complicated structure of table constraints.
 
3
TConstr DEFINITIONS AUTOMATIC TAGS ::=
 
4
 
 
5
BEGIN
 
6
 
 
7
MYCLASS ::= CLASS {
 
8
  &id    OBJECT IDENTIFIER UNIQUE,
 
9
  &Type,
 
10
  &Result     OPTIONAL
 
11
} WITH SYNTAX {
 
12
  ID &id
 
13
  TYPE &Type
 
14
  [RESULT &Result]
 
15
}
 
16
 
 
17
object1 MYCLASS ::= {ID id-object1 TYPE Type-object1 RESULT INTEGER}
 
18
object2 MYCLASS ::= {ID id-object2 TYPE Type-object2}
 
19
object3 MYCLASS ::= {ID id-object3 TYPE Type-object3 RESULT BOOLEAN}
 
20
 
 
21
ObjectSet MYCLASS ::= {object1 | object2 | object3}
 
22
 
 
23
id-object1 OBJECT IDENTIFIER ::= {2 4}
 
24
id-object2 OBJECT IDENTIFIER ::= {2 5}
 
25
id-object3 OBJECT IDENTIFIER ::= {2 6 7}
 
26
 
 
27
 
 
28
Type-object1 ::= SEQUENCE {
 
29
  a INTEGER,
 
30
  b BOOLEAN
 
31
}
 
32
 
 
33
Type-object2 ::= ENUMERATED {first, second, third}
 
34
 
 
35
Type-object3 ::= CHOICE {
 
36
  first   SEQUENCE {a BOOLEAN, b INTEGER},
 
37
  second  INTEGER
 
38
}
 
39
 
 
40
Seq1 ::= SEQUENCE {
 
41
  a  SEQUENCE {aa INTEGER, ab MYCLASS.&id ({ObjectSet})},
 
42
  b  SEQUENCE {ba INTEGER, bb MYCLASS.&Type ({ObjectSet}{@a.ab})}
 
43
}
 
44
 
 
45
Seq2 ::= SEQUENCE {
 
46
  identity INTEGER,
 
47
  content SEQUENCE {
 
48
    subid MYCLASS.&id ({ObjectSet}),
 
49
    subcontent MYCLASS.&Type ({ObjectSet}{@content.subid}),
 
50
    subresult  MYCLASS.&Result ({ObjectSet}{@content.subid})
 
51
  }
 
52
}
 
53
 
 
54
 
 
55
-- following from Peter's definitions
 
56
 
 
57
 
 
58
MY-CLASS ::= CLASS {
 
59
        &id OBJECT IDENTIFIER UNIQUE,
 
60
        &Type }
 
61
   WITH SYNTAX {
 
62
        ID &id
 
63
        TYPE &Type }
 
64
        
 
65
Info ::=  SEQUENCE  {
 
66
     xyz SEQUENCE {
 
67
               abc MY-CLASS.&id({Supported}) 
 
68
               }, 
 
69
     uvw MY-CLASS.&Type ({Supported}{@xyz.abc}) }
 
70
 
 
71
Supported MY-CLASS ::= { dsa | rsa }
 
72
 
 
73
-- dsa
 
74
 
 
75
   id-dsa OBJECT IDENTIFIER ::= { 1 2 }
 
76
 
 
77
   DSAPublicKey ::= INTEGER  -- public key, y
 
78
 
 
79
   dsa MY-CLASS ::= {
 
80
       ID id-dsa
 
81
       TYPE DSAPublicKey }
 
82
 
 
83
-- rsa
 
84
 
 
85
   rsaEncryption OBJECT IDENTIFIER ::=  { 1 3 4 }
 
86
 
 
87
   RSAPublicKey ::= SEQUENCE {
 
88
      modulus            INTEGER,    -- n
 
89
      publicExponent     INTEGER  }  -- e
 
90
 
 
91
   rsa MY-CLASS ::= {
 
92
        ID rsaEncryption
 
93
        TYPE RSAPublicKey }
 
94
 
 
95
END