xref: /freebsd/crypto/heimdal/lib/asn1/canthandle.asn1 (revision 6a068746777241722b2b32c5d0bc443a2a64d80b)
1*ae771770SStanislav Sedov-- $Id$ --
2c19800e8SDoug Rabson
3c19800e8SDoug RabsonCANTHANDLE DEFINITIONS ::= BEGIN
4c19800e8SDoug Rabson
5c19800e8SDoug Rabson-- Code the tag [1] but not the [ CONTEXT CONS UT_Sequence ] for Kaka2
6c19800e8SDoug Rabson-- Workaround: use inline the structure directly
7c19800e8SDoug Rabson-- Code the tag [2] but it should be primitive since KAKA3 is
8c19800e8SDoug Rabson-- Workaround: use the INTEGER type directly
9c19800e8SDoug Rabson
10c19800e8SDoug RabsonKaka2  ::= SEQUENCE {
11c19800e8SDoug Rabson        kaka2-1 [0] INTEGER
12c19800e8SDoug Rabson}
13c19800e8SDoug Rabson
14c19800e8SDoug RabsonKaka3  ::= INTEGER
15c19800e8SDoug Rabson
16c19800e8SDoug RabsonFoo ::= SEQUENCE {
17c19800e8SDoug Rabson        kaka1 [0] IMPLICIT INTEGER OPTIONAL,
18c19800e8SDoug Rabson        kaka2 [1] IMPLICIT Kaka2 OPTIONAL,
19c19800e8SDoug Rabson        kaka3 [2] IMPLICIT Kaka3 OPTIONAL
20c19800e8SDoug Rabson}
21c19800e8SDoug Rabson
22c19800e8SDoug Rabson-- Don't code kaka if it's 1
23c19800e8SDoug Rabson-- Workaround is to use OPTIONAL and check for in the encoder stubs
24c19800e8SDoug Rabson
25c19800e8SDoug RabsonBar ::= SEQUENCE {
26c19800e8SDoug Rabson        kaka [0] INTEGER DEFAULT 1
27c19800e8SDoug Rabson}
28c19800e8SDoug Rabson
29c19800e8SDoug Rabson--  Can't handle primitives in SET OF
30c19800e8SDoug Rabson--  Workaround is to define a type that is only an integer and use that
31c19800e8SDoug Rabson
32c19800e8SDoug RabsonBaz ::= SET OF INTEGER
33c19800e8SDoug Rabson
34c19800e8SDoug RabsonEND
35