Created with colorer-take5 library. Type 'asn1'

--
-- @(#) IvmaiAsn-USEFUL.asn - ASN1 built-in and useful definitions.
-- (c) 2002 Ivan Maidanski <ivmai@mail.ru>
-- Free specification (GNU GPL). No warranties. All rights reserved.
-- -
-- Project: IvmaiAsn ASN1/ECN/XDR Tools
-- Language: ASN.1:2002
-- Tested with: OSS Nokalva ASN.1 Syntax Checker v5.4.0
-- --

--
-- This ASN.1 module defines the built-in classes and types
-- (including "useful" types) of ASN.1:2002 (Abstract Syntax
-- Notation) language according to their specification in ITU-T
-- X.680 and X.681 documents (as precisely as it is possible to be
-- expressed in the ASN.1 language itself).
-- This file could be a user formal reference on the built-in types
-- of ASN.1 language.
-- This file could be used as an integral part of an ASN.1 compiler.
-- --

--
-- Normative references:
-- - ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002,
-- Information technology - Abstract Syntax Notation One (ASN.1):
-- Specification of basic notation.
-- - ITU-T Recommendation X.681 (2002) | ISO/IEC 8824-2:2002,
-- Information technology - Abstract Syntax Notation One (ASN.1):
-- Information object specification.
-- - ITU-T Recommendation X.682 (2002) | ISO/IEC 8824-3:2002,
-- Information technology - Abstract Syntax Notation One (ASN.1):
-- Constraint specification.
-- - ITU-T Recommendation X.683 (2002) | ISO/IEC 8824-4:2002,
-- Information technology - Abstract Syntax Notation One (ASN.1):
-- Parameterization of ASN.1 specifications.
-- --

IvmaiAsn-USEFUL
 --< ASN1.Version 1994 IvmaiAsn-USEFUL >--
DEFINITIONS EXPLICIT TAGS ::= BEGIN

--
-- Note 1: A trailing '0' char for names (if present) shall be
-- ignored.
-- Note 2: All 'APPLICATION' tags shall be treated as 'UNIVERSAL'
-- (except for the tag with number zero which means no implicit tag
-- is assigned).
-- --

EXPORTS
        ABSTRACT-SYNTAX0 -- ABSTRACT-SYNTAX --,
        BIT0 -- BIT STRING --,
        BMPString0 -- BMPString --,
        BOOLEAN0 -- BOOLEAN --,
        CHOICE0 -- CHOICE --,
        ENUMERATED0 -- ENUMERATED --,
        EXTERNAL0 -- EXTERNAL --,
        GeneralString0 -- GeneralString --,
        GeneralizedTime0 -- GeneralizedTime --,
        GraphicString0 -- GraphicString --,
        IA5String0 -- IA5String --,
        INSTANCE0 {} -- INSTANCE OF --,
        INTEGER0 -- INTEGER --,
        ISO646String0 -- ISO646String --,
        NULL0 -- NULL --,
        NumericString0 -- NumericString --,
        OBJECT0 -- OBJECT IDENTIFIER --,
        OCTET0 -- OCTET STRING --,
        ObjectDescriptor0 -- ObjectDescriptor --,
        PrintableString0 -- PrintableString --,
        REAL0 -- REAL --,
        RELATIVE-OID0 -- RELATIVE-OID --,
        SEQUENCE0 -- SEQUENCE | SEQUENCE OF --,
        SET0 -- SET | SET OF --,
        T61String0 -- T61String --,
        TYPE-IDENTIFIER0 -- TYPE-IDENTIFIER --,
        TeletexString0 -- TeletexString --,
        UTCTime0 -- UTCTime --,
        UTF8String0 -- UTF8String --,
        UniversalString0 -- UniversalString --,
        VideotexString0 -- VideotexString --,
        VisibleString0 -- VisibleString --;

IMPORTS;

OCTET0 -- STRING -- ::= [APPLICATION 4] IMPLICIT OCTET STRING

BIT0 -- STRING -- ::= [APPLICATION 3] IMPLICIT OCTET STRING

CHOICE0 ::= [APPLICATION 0] IMPLICIT OCTET STRING

SEQUENCE0 ::= [APPLICATION 16] IMPLICIT OCTET STRING

SET0 ::= [APPLICATION 17] IMPLICIT OCTET STRING

NULL0 ::= [APPLICATION 5] IMPLICIT SEQUENCE {}

INTEGER0 ::= [APPLICATION 2] IMPLICIT OCTET STRING

ENUMERATED0 ::= [APPLICATION 10] IMPLICIT INTEGER

BOOLEAN0 ::= [APPLICATION 1] IMPLICIT ENUMERATED {
        false(0),
        true(1) }

UniversalString0 ::= [APPLICATION 28] IMPLICIT UniversalString
 -- OCTET STRING --
 (FROM ({ 0, 0, 0, 0 } .. { 0, 0, 215, 255 } |
  { 0, 0, 224, 0 } .. { 0, 0, 255, 253 } |
  { 0, 1, 0, 0 } .. { 127, 255, 255, 255 }))

RELATIVE-OID0 ::= [APPLICATION 13] IMPLICIT SEQUENCE OF
 INTEGER (0 .. MAX)

OBJECT0 -- IDENTIFIER -- ::= [APPLICATION 6] IMPLICIT RELATIVE-OID0

 -- Here is the root set of all valid OID values (in addition, the
 -- given identifiers are all and the only those could be used in
 -- the "NameForm" syntax) --
OIDRootSet OBJECT IDENTIFIER ::= {
        { itu-t(0) recommendation(0) } |
        { itu-t(0) recommendation(0) a(1) } |
        { itu-t(0) recommendation(0) b(2) } |
        { itu-t(0) recommendation(0) c(3) } |
        { itu-t(0) recommendation(0) d(4) } |
        { itu-t(0) recommendation(0) e(5) } |
        { itu-t(0) recommendation(0) f(6) } |
        { itu-t(0) recommendation(0) g(7) } |
        { itu-t(0) recommendation(0) h(8) } |
        { itu-t(0) recommendation(0) i(9) } |
        { itu-t(0) recommendation(0) j(10) } |
        { itu-t(0) recommendation(0) k(11) } |
        { itu-t(0) recommendation(0) l(12) } |
        { itu-t(0) recommendation(0) m(13) } |
        { itu-t(0) recommendation(0) n(14) } |
        { itu-t(0) recommendation(0) o(15) } |
        { itu-t(0) recommendation(0) p(16) } |
        { itu-t(0) recommendation(0) q(17) } |
        { itu-t(0) recommendation(0) r(18) } |
        { itu-t(0) recommendation(0) s(19) } |
        { itu-t(0) recommendation(0) t(20) } |
        { itu-t(0) recommendation(0) u(21) } |
        { itu-t(0) recommendation(0) v(22) } |
        { itu-t(0) recommendation(0) w(23) } |
        { itu-t(0) recommendation(0) x(24) } |
        { itu-t(0) recommendation(0) y(25) } |
        { itu-t(0) recommendation(0) z(26) } |
        { itu-t(0) question(1) } |
        { itu-t(0) administration(2) } |
        { itu-t(0) network-operator(3) } |
        { ccitt(0) identified-organization(4) } |
        -- { itu-t(0) 5 } |
        -- { itu-t(0) 9 } |
        { iso(1) standard(0) } |
        { iso(1) 1 } |
        { iso(1) member-body(2) } |
        { iso(1) identified-organization(3) } |
        { joint-iso-itu-t(2) 0 } |
        { joint-iso-itu-t(2) -- asn1 -- 1 } |
        { joint-iso-ccitt(2) 2 } |
        { joint-iso-itu-t(2) 3 } |
        { joint-iso-itu-t(2) 4 } |
        { joint-iso-itu-t(2) 5 } |
        { joint-iso-itu-t(2) 6 } |
        { joint-iso-itu-t(2) 7 } |
        { joint-iso-itu-t(2) 8 } |
        { joint-iso-itu-t(2) 9 } |
        { joint-iso-itu-t(2) 10 } |
        { joint-iso-itu-t(2) 11 } |
        { joint-iso-itu-t(2) 12 } |
        { joint-iso-itu-t(2) 13 } |
        { joint-iso-itu-t(2) 14 } |
        { joint-iso-itu-t(2) 15 } |
        { joint-iso-itu-t(2) 16 } |
        { joint-iso-itu-t(2) 17 } |
        { joint-iso-itu-t(2) 18 } |
        { joint-iso-itu-t(2) 19 } |
        { joint-iso-itu-t(2) 20 } |
        { joint-iso-itu-t(2) 21 } |
        { joint-iso-itu-t(2) 22 } |
        { joint-iso-itu-t(2) 23 } |
        { joint-iso-itu-t(2) 24 } }

REAL0 ::= [APPLICATION 9] IMPLICIT SEQUENCE {
        mantissa [0] IMPLICIT INTEGER (ALL EXCEPT 0),
        base [1] IMPLICIT INTEGER (2 | 10),
        exponent [2] IMPLICIT INTEGER }

ABSTRACT-SYNTAX0 ::= CLASS {
        &id OBJECT IDENTIFIER UNIQUE,
        &Type,
        &property BIT STRING {
                handles-invalid-encodings(0) }
         DEFAULT {} }
 WITH SYNTAX {
        &Type
        IDENTIFIED BY &id
        [ HAS PROPERTY &property ] }

TYPE-IDENTIFIER0 ::= CLASS {
        &id OBJECT IDENTIFIER UNIQUE,
        &Type }
 WITH SYNTAX {
        &Type
        IDENTIFIED BY &id }

INSTANCE0 -- OF -- { TYPE-IDENTIFIER-CLASS } ::=
 [APPLICATION 8] IMPLICIT SEQUENCE {
        type-id TYPE-IDENTIFIER-CLASS.&id,
        value [0] TYPE-IDENTIFIER-CLASS.&Type }

BMPString0 ::= [APPLICATION 30] IMPLICIT UniversalString0
 (FROM ({ 0, 0, 0, 0 } .. { 0, 0, 255, 253 }))

UTF8String0 ::= [APPLICATION 12] IMPLICIT UniversalString0
 (FROM (
 -- '0xxxxxxx'B --
  { 0, 0, 0, 0 } .. { 0, 0, 0, 127 } |
 -- '110xxxxx 10xxxxxx'B --
  { 0, 0, 0, 128 } .. { 0, 0, 7, 255 } |
 -- '1110xxxx 10xxxxxx 10xxxxxx'B --
  { 0, 0, 8, 0 } .. { 0, 0, 255, 255 } |
 -- '11110xxx 10xxxxxx 10xxxxxx 10xxxxxx'B --
  { 0, 1, 0, 0 } .. { 0, 31, 255, 255 } |
 -- '111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx'B --
  { 0, 32, 0, 0 } .. { 3, 255, 255, 255 } |
 -- '1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx'B --
  { 4, 0, 0, 0 } .. { 127, 255, 255, 255 }))

IA5String0 ::= [APPLICATION 22] IMPLICIT UTF8String0
 (FROM ({ 0, 0, 0, 0 } .. { 0, 0, 0, 127 }))
 -- (FROM ({ 0, 0 } .. { 7, 15 }))

VisibleString0 ::= [APPLICATION 26] IMPLICIT IA5String
 (FROM (ALL EXCEPT ({ 0, 0 } .. { 1, 15 } | { 7, 15 })))

ISO646String0 ::= VisibleString0

PrintableString0 ::= [APPLICATION 19] IMPLICIT VisibleString0
 (FROM (" " | "'" | "(" | ")" | "+" | "," | "-" | "." | "/" |
  "0" .. "9" | ":" | "=" | "?" | "A" .. "Z" | "a" .. "z"))

NumericString0 ::= [APPLICATION 18] IMPLICIT PrintableString0
 (FROM (" " | "0" .. "9"))

GeneralString0 ::= [APPLICATION 27] IMPLICIT UTF8String0
 -- Encoded with (explicit) escape sequences (multi-octet) --
 -- (FROM (1 [default C0] | 6 [default G0] | all G & C sets |
 -- SPACE | DELETE)) --
 (FROM ({ 0, 0, 0, 0 } .. { 0, 0, 0, 255 } |
  { 0, 0, 1, 0 } .. { 127, 255, 255, 255 }))

GraphicString0 ::= [APPLICATION 25] IMPLICIT GeneralString0
 (FROM (ALL EXCEPT ({ 0, 0, 0, 0 } .. { 0, 0, 0, 31 } |
  { 0, 0, 0, 127 } | { 0, 0, 0, 128 } .. { 0, 0, 0, 159 })))

TeletexString0 ::= [APPLICATION 20] IMPLICIT GeneralString0
 -- (FROM (6 | 87 | 102 [default G0] | 103 | 106 [default C0] |
 -- 107 [default C1] | 126 | 144 | 150 | 153 | 156 | 164 | 165 |
 -- 168 | SPACE | DELETE)) --

T61String0 ::= TeletexString0

VideotexString0 ::= [APPLICATION 21] IMPLICIT GeneralString0
 -- (FROM (1 [default C0] | 13 | 72 | 73 [default C1] | 87 | 89 |
 -- 102 [default G0] | 108 | 126 | 128 | 129 | 144 | 150 | 153 |
 -- 164 | 165 | 168 | SPACE | DELETE)) --

GeneralizedTime0 ::= [APPLICATION 24] IMPLICIT VisibleString0
 -- Part \1 is year, \2 is month (01-12), \3 is day (01-31), \4 is
 -- hour (00-23), \5 is minute (00-59), \6 is second (00-59), \7 is
 -- decimal fraction of second, if \8 is empty then the time is
 -- local, else if \8 is "Z" then the time is UTC, else \9 is the
 -- timezone difference (hour and minute) between local and UTC --
 (PATTERN
 "(\d#4)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)([\.,]\d*)?(Z|([\-\+]\d#4))?")

UTCTime0 ::= [APPLICATION 23] IMPLICIT VisibleString0
 -- Part \1 is year of century, \2 is month (01-12), \3 is day
 -- (01-31), \4 is hour (00-23), \5 is minute (00-59), \6 (if not
 -- empty) is second (00-59), if \7 is "Z" then the time is UTC,
 -- else \8 is the timezone difference (hour and minute) between
 -- local and UTC --
 (PATTERN "(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)?(Z|([\-\+]\d#4))")

ObjectDescriptor0 ::= [APPLICATION 7] IMPLICIT GraphicString0

EXTERNAL0 ::= [APPLICATION 8] IMPLICIT SEQUENCE {
        identification [0] CHOICE {
 -- Abstract and transfer syntax object identifiers --
                syntaxes [0] IMPLICIT SEQUENCE {
                        abstract [0] IMPLICIT OBJECT IDENTIFIER,
                        transfer [1] IMPLICIT OBJECT IDENTIFIER },
 -- A single object identifier for identification of the abstract
 -- and transfer syntaxes --
                syntax [1] IMPLICIT OBJECT IDENTIFIER,
 -- The negotiated OSI presentation context identifies the abstract
 -- and transfer syntaxes (applicable only to OSI environments) --
                presentation-context-id [2] IMPLICIT INTEGER,
 -- Context-negotiation in progress, presentation-context-id
 -- identifies only the abstract syntax, so the transfer syntax
 -- shall be specified (applicable only to OSI environments) --
                context-negotiation [3] IMPLICIT SEQUENCE {
                        presentation-context-id [0] IMPLICIT
                         INTEGER,
                        transfer-syntax [1] IMPLICIT
                         OBJECT IDENTIFIER },
 -- The type of the value (for example, specification that it is the
 -- value of an ASN.1 type) is fixed by the application designer
 -- (and hence known to both sender and receiver) --
 -- This case is provided primarily to support
 -- selective-field-encryption (or other encoding transformations)
 -- of an ASN.1 type --
                transfer-syntax [4] IMPLICIT OBJECT IDENTIFIER,
 -- The data value is the value of a fixed ASN.1 type (and hence
 -- known to both sender and receiver) --
                fixed [5] IMPLICIT NULL },
 -- This provides human-readable identification of the class of the
 -- value --
        data-value-descriptor [1] IMPLICIT
         ObjectDescriptor OPTIONAL,
        data-value [2] IMPLICIT OCTET STRING }
 (WITH COMPONENTS {
        ...,
        identification (WITH COMPONENTS {
                ...,
                syntaxes ABSENT,
                transfer-syntax ABSENT,
                fixed ABSENT }) })

EMBEDDED0 -- PDV -- ::= [APPLICATION 11] IMPLICIT SEQUENCE {
        identification [0] CHOICE {
 -- Abstract and transfer syntax object identifiers --
                syntaxes [0] IMPLICIT SEQUENCE {
                        abstract [0] IMPLICIT OBJECT IDENTIFIER,
                        transfer [1] IMPLICIT OBJECT IDENTIFIER },
 -- A single object identifier for identification of the abstract
 -- and transfer syntaxes --
                syntax [1] IMPLICIT OBJECT IDENTIFIER,
 -- The negotiated OSI presentation context identifies the abstract
 -- and transfer syntaxes (applicable only to OSI environments) --
                presentation-context-id [2] IMPLICIT INTEGER,
 -- Context-negotiation in progress, presentation-context-id
 -- identifies only the abstract syntax, so the transfer syntax
 -- shall be specified (applicable only to OSI environments) --
                context-negotiation [3] IMPLICIT SEQUENCE {
                        presentation-context-id [0] IMPLICIT
                         INTEGER,
                        transfer-syntax [1] IMPLICIT
                         OBJECT IDENTIFIER },
 -- The type of the value (for example, specification that it is the
 -- value of an ASN.1 type) is fixed by the application designer
 -- (and hence known to both sender and receiver) --
 -- This case is provided primarily to support
 -- selective-field-encryption (or other encoding transformations)
 -- of an ASN.1 type --
                transfer-syntax [4] IMPLICIT OBJECT IDENTIFIER,
 -- The data value is the value of a fixed ASN.1 type (and hence
 -- known to both sender and receiver) --
                fixed [5] IMPLICIT NULL },
 -- This provides human-readable identification of the class of the
 -- value --
        data-value-descriptor [1] IMPLICIT
         ObjectDescriptor OPTIONAL,
        data-value [2] IMPLICIT OCTET STRING }
 (WITH COMPONENTS {
        ...,
        data-value-descriptor ABSENT })

CHARACTER0 -- STRING -- ::= [APPLICATION 29] IMPLICIT SEQUENCE {
        identification [0] CHOICE {
 -- Abstract and transfer syntax object identifiers --
                syntaxes [0] IMPLICIT SEQUENCE {
                        abstract [0] IMPLICIT OBJECT IDENTIFIER,
                        transfer [1] IMPLICIT OBJECT IDENTIFIER },
 -- A single object identifier for identification of the abstract
 -- and transfer syntaxes --
                syntax [1] IMPLICIT OBJECT IDENTIFIER,
 -- The negotiated OSI presentation context identifies the abstract
 -- and transfer syntaxes (applicable only to OSI environments) --
                presentation-context-id [2] IMPLICIT INTEGER,
 -- Context-negotiation in progress, presentation-context-id
 -- identifies only the abstract syntax, so the transfer syntax
 -- shall be specified (applicable only to OSI environments) --
                context-negotiation [3] IMPLICIT SEQUENCE {
                        presentation-context-id [0] IMPLICIT
                         INTEGER,
                        transfer-syntax [1] IMPLICIT
                         OBJECT IDENTIFIER },
 -- The type of the value (for example, specification that it is the
 -- value of an ASN.1 type) is fixed by the application designer
 -- (and hence known to both sender and receiver) --
 -- This case is provided primarily to support
 -- selective-field-encryption (or other encoding transformations)
 -- of an ASN.1 type --
                transfer-syntax [4] IMPLICIT OBJECT IDENTIFIER,
 -- The data value is the value of a fixed ASN.1 type (and hence
 -- known to both sender and receiver) --
                fixed [5] IMPLICIT NULL },
 -- This provides human-readable identification of the class of the
 -- value --
        data-value-descriptor [1] IMPLICIT
         ObjectDescriptor OPTIONAL,
        string-value [2] IMPLICIT OCTET STRING }
 (WITH COMPONENTS {
        ...,
        data-value-descriptor ABSENT })

END