(* X5OODAP .TPL *)
(*****************************************************************************)
(* ASN.1 X.500 Directory Access Protocol Template                            *)
(*                                                                           *)
(* - Defines:                                                                *)
(*    - Bind and Unbind to DSA (X.511)                                       *)
(*    - readASE Remote Operations (X.511)                                    *)
(*       - Abandon                                                           *)
(*       - Compare                                                           *)
(*       - Read                                                              *)
(* - Extensions not supported yet                 (??)                       *)
(* tagging of strong credentials and external procedure IS WRONG!            *)
(* eg need tag for 5stcr, 5toks....                                          */
(*****************************************************************************)

(*****************************************************************************)
(* DirectoryBind Operation                                                   *)
(*****************************************************************************)


DirectoryBindArgChoice     LABEL     = 5barc
                           STRUCTURE = CHOICE
                           TAG       = (C 16 C)
                           CHILDREN  = { <5barg, U 17 C,O,0> }

DirectoryBindArgument      LABEL     = 5barg
                           STRUCTURE = SET
                           CHILDREN  = { <5cred, C  0 C,O,0>,
                                         <5vers, C  1 P,D,0>E}

Credentials                LABEL     = 5cred
                           STRUCTURE = CHOICE
                           TAG       = (C 0 C)
                           CHILDREN  = { <5sicr, C  0 C,O,0> ,
                                         <5stcr, C  1 C,O,0> ,
                                         <5extn, C  2 C,O,0> }

SimpleCredentials          LABEL     = 5sicr
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5sicn, C  0 C,M,0> ,
                                         <5cval, C  1 C,O,0> ,
                                         <5pass, C  2 P,O,0> }

name                       LABEL     = 5sicn
                           STRUCTURE = SEQUENCE OF
                           CHILDREN  = { <5rldn, U 17 C,O,0> }

validity                   LABEL     = 5cval
                           STRUCTURE = SET
                           CHILDREN  = { <5tim1, C  0 P,O,0>E,
                                         <5tim2, C  1 P,O,0>E,
                                         <5rnd1, C  2 P,O,0>E,
                                         <5rnd2, C  3 P,O,0>E }

time1                      LABEL     = 5tim1
                           STRUCTURE = UTC TIME

time2                      LABEL     = 5tim2
                           STRUCTURE = UTC TIME

random1                    LABEL     = 5rnd1
                           STRUCTURE = BITSTRING

random2                    LABEL     = 5rnd2
                           STRUCTURE = BITSTRING

password                   LABEL     = 5pass
                           STRUCTURE = OCTETSTRING

External                   LABEL     = 5extn
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5dref, U 6 P,O,0>,
                                         <5iref, U 2 P,O,0>,
                                         <5dvds, U 7 P,O,0>,
                                         <5encd, U 0 P,O,0> }

Direct Reference           LABEL     = 5dref
                           STRUCTURE = OBJECT IDENTIFIER

Indirect Reference         LABEL     = 5iref
                           STRUCTURE = INTEGER

Data Value Descriptor      LABEL     = 5dvds
                           STRUCTURE = OBJECT DESCRIPTOR

Encoding                   LABEL     = 5encd
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5asn1, C 0 C,O,0>,
                                         <5octa, C 1 P,O,0>,
                                         <5arbi, C 2 P,O,0> }

Single ASN.1 Type          LABEL     = 5asn1
                           STRUCTURE = ANY
                           TAG       = (C 0 C)
                           CHILDREN  = { }

Octet Aligned              LABEL     = 5octa
                           STRUCTURE = OCTETSTRING

Arbitrary                  LABEL     = 5arbi
                           STRUCTURE = BIT STRING

StrongCredentials          LABEL     = 5stcr
                           STRUCTURE = SET
                           CHILDREN  = { <5cpth, C  0 C,O,0> ,
                                         <5toks, C  1 C,M,0> }

Token (SIGNED)             LABEL     = 5toks
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5tokn, U 16 C,M,0> ,
                                         <5algi, U 16 C,M,0> ,
                                         <5encr, U  3 P,M,0> }

Token                      LABEL     = 5tokn
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5tkal, C  0 C,M,0> ,
                                         <5tnam, C  1 C,M,0> ,
                                         <5time, C  2 P,M,0> ,
                                         <5rndm, C  3 P,M,0> }

name                       LABEL     = 5tnam
                           STRUCTURE = SEQUENCE OF
                           CHILDREN  = { <5rldn, U 17 C,O,0> }

algorithm                  LABEL     = 5tkal
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5algm, U  6 P,M,0> ,
                                         <5prms, U  0 P,O,0> }

time                       LABEL     = 5time
                           STRUCTURE = UTC TIME

random                     LABEL     = 5rndm
                           STRUCTURE = BITSTRING

Versions                   LABEL     = 5vers
                           STRUCTURE = BITSTRING

DirectoryBindResChoice     LABEL     = 5brsc
                           STRUCTURE = CHOICE
                           TAG       = (C 17 C)
                           CHILDREN  = { <5barg, U 17 C,O,0> }

DirectoryBindErrChoice     LABEL     = 5berc
                           STRUCTURE = CHOICE
                           TAG       = (C 18 C)
                           CHILDREN  = { <5berr, U 17 C,O,0> }

DirectoryBindError         LABEL     = 5berr
                           STRUCTURE = SET
                           CHILDREN  = { <5vers, C  0 P,D,0> ,
                                         <5bech, U  0 P,M,0> }

bindErrorTypeChoice        LABEL     = 5bech
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5svet, C  1 P,O,0> ,
                                         <5scet, C  2 P,O,0> }

ServiceErrorTag            LABEL     = 5svet
                           STRUCTURE = TAG
                           CHILDREN  = { <5prot, U 02 P,M,0> }

SecurityErrorTag           LABEL     = 5scet
                           STRUCTURE = TAG
                           CHILDREN  = { <5prot, U 02 P,M,0> }



(*****************************************************************************)
(* DirectoryUnbind Operation has no parameters (Argument/Result/Error)       *)
(*****************************************************************************)


(*****************************************************************************)
(* Remote Operations APDU Definitions for DUA Operations                     *)
(*****************************************************************************)

ROSEapdu                   LABEL     = 5apdu
                           STRUCTURE = UNTAGGED CHOICE
                           CHILDREN  = { <5roiv, C  1 C,O,0>E,
                                         <5rors, C  2 C,O,0>,
                                         <5roer, C  3 C,O,0>,
                                         <5rorj, C  4 C,O,0> }

ROIVapdu                   LABEL     = 5roiv
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5inid, U  2 P,M,0>,
                                         <5lkid, C  0 P,O,0>E,
                                         <5oper, U  0 P,M,0>*,
                                         <5args, U  0 P,O,0>E}

InvokeID                   LABEL     = 5inid
                           STRUCTURE = INTEGER

LinkedID                   LABEL     = 5lkid
                           STRUCTURE = INTEGER

Operation                  LABEL     = 5oper
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5opri, U  2 P,O,0>*,
                                         <5opro, U  6 P,O,0>* }

OperationInteger           LABEL     = 5opri
                           STRUCTURE = INTEGER

OperationObjectIdentifier  LABEL     = 5opro
                           STRUCTURE = OBJECT IDENTIFIER

(* this is an untagged any defined by ! *)
Arguments                  LABEL     = 5args
                           STRUCTURE = ANY DEFINED BY
                           DEFGLABEL = 5oper
                           REGISTER  = { <01,5read, U  0 P,0>E,
                                         <02,5cmpr, U  0 P,0>E,
                                         <03,5aban, U 16 C,0>E }

RORSapdu                   LABEL     = 5rors
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5inid, U  2 P,M,0>,
                                         <5rslt, U 16 C,O,0> }

ResultPair                 LABEL     = 5rslt
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5oper, U  0 P,M,0>*,
                                         <5rlts, U  0 P,M,0> }

(* this is an untagged any defined by ! *)
Results                    LABEL     = 5rlts
                           STRUCTURE = ANY DEFINED BY
                           DEFGLABEL = 5oper
                           REGISTER  = { <01,5rdrs, U  0 P,0>,
                                         <02,5cmrs, U  0 P,0>,
                                         <03,5null, U  5 P,0> }

ROERapdu                   LABEL     = 5roer
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5inid, U  2 P,M,0>,
                                         <5errv, U  0 P,M,0>*,
                                         <5errp, U  0 P,O,0>  }

ErrorValue                 LABEL     = 5errv
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5erri, U  2 P,O,0>*,
                                         <5erro, U  6 P,O,0>* }

ErrorValueInteger          LABEL     = 5erri
                           STRUCTURE = INTEGER

ErrorValueObjectIdentifier LABEL     = 5erro
                           STRUCTURE = OBJECT IDENTIFIER

(* this is an untagged any defined by ! *)
ErrorParameters            LABEL     = 5errp
                           STRUCTURE = ANY DEFINED BY
                           DEFGLABEL = 5errv
                           REGISTER  = { <01,5ater, U 17 C,0>,
                                         <02,5nmer, U 17 C,0>,
                                         <03,5sver, U 17 C,0>,
                                         <04,5rfrl, U 17 C,0>,
                                         <05,5null, U  5 P,0>,
                                         <06,5scer, U 17 C,0>,
                                         <07,5abfl, U 17 C,0>,
                                         <08,5uper, U 17 C,0> }

RORJapdu                   LABEL     = 5rorj
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5inrj, U  0 P,M,0>,
                                         <5prbm, U  0 P,M,0> }

RORJInvokeidChoice         LABEL     = 5inrj
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5inid, U  2 P,O,0>,
                                         <5null, U  5 P,O,0> }

Null                       LABEL     = 5null
                           STRUCTURE = NULL

RORJProblemChoice          LABEL     = 5prbm
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5grlp, C  0 P,O,0>,
                                         <5ivkp, C  1 P,O,0>,
                                         <5rrsp, C  2 P,O,0>,
                                         <5rerp, C  3 P,O,0> }

GeneralProblem             LABEL     = 5grlp
                           STRUCTURE = INTEGER

InvokeProblem              LABEL     = 5ivkp
                           STRUCTURE = INTEGER

ReturnResultProblem        LABEL     = 5rrsp
                           STRUCTURE = INTEGER

ReturnErrorProblem         LABEL     = 5rerp
                           STRUCTURE = INTEGER


(*****************************************************************************)
(* Read Operation Arguments                                                  *)
(*****************************************************************************)

ReadArgument (OPT-SIGNED)  LABEL     = 5read
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5reau, U 17 C,O,0>,
                                         <5reas, U 16 C,O,0> }

ReadArgument (SIGNED)      LABEL     = 5reas
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5reau, U 17 C,M,0> ,
                                         <5algi, U 16 C,M,0> ,
                                         <5encr, U  3 P,M,0> }

ReadArgument               LABEL     = 5reau
                           STRUCTURE = SET
                           CHILDREN  = { <5objc, C  0 C,M,0> ,
                                         <5entt, C  1 C,D,0> ,
                                         <5sctt, C 30 C,D,0> ,
                                         <5sect, C 29 C,D,0> ,
                                         <5reqt, C 28 C,O,0> ,
                                         <5prgs, C 27 C,D,0> ,
                                         <5alrt, C 26 C,O,0> ,
                                         <5extt, C 25 C,O,0> }

object                     LABEL     = 5objc
                           STRUCTURE = CHOICE
                           TAG       = (C 0 C)
                           CHILDREN  = { <5rdns, U 16 C,O,0> }

requestorTag               LABEL     = 5reqt
                           STRUCTURE = TAG
                           CHILDREN  = { <5reqr, U 16 C,M,0> }

requestor                  LABEL     = 5reqr
                           STRUCTURE = SEQUENCE OF
                           CHILDREN  = { <5rldn, U 17 C,M,0> }

(*****************************************************************************)
(* Read Operation Result                                                     *)
(*****************************************************************************)

ReadResult (OPT-SIGNED)    LABEL     = 5rdrs
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5rrsu, U 17 C,O,0>,
                                         <5rrss, U 16 C,O,0> }

ReadResult (SIGNED)        LABEL     = 5rrss
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5rrsu, U 17 C,M,0> ,
                                         <5algi, U 16 C,M,0> ,
                                         <5encr, U  3 P,M,0> }

ReadResult                 LABEL     = 5rrsu
                           STRUCTURE = SET
                           CHILDREN  = { <5enrt, C  0 C,M,0> ,
                                         <5scpt, C 30 C,O,0> ,
                                         <5pert, C 29 C,O,0> ,
                                         <5alit, C 28 C,D,0> }

performerTag               LABEL     = 5pert
                           STRUCTURE = TAG
                           CHILDREN  = { <5perf, U 16 C,M,0> }

performer                  LABEL     = 5perf
                           STRUCTURE = SEQUENCE OF
                           CHILDREN  = { <5rldn, U 17 C,O,0> }

aliasDereferencedTag       LABEL     = 5alit
                           STRUCTURE = TAG
                           CHILDREN  = { <5alid, U 01 C,M,0> }

aliasDereferenced          LABEL     = 5alid
                           STRUCTURE = BOOLEAN

(*****************************************************************************)
(* Compare Operation Arguments                                               *)
(*****************************************************************************)

CompareArgument (OPT-SGND) LABEL     = 5cmpr
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5cmpu, U 17 C,O,0>,
                                         <5cmps, U 16 C,O,0> }

CompareArgument (SIGNED)   LABEL     = 5cmps
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5cmpu, U 17 C,M,0> ,
                                         <5algi, U 16 C,M,0> ,
                                         <5encr, U  3 P,M,0> }

CompareArgument            LABEL     = 5cmpu
                           STRUCTURE = SET
                           CHILDREN  = { <5objc, C  0 C,M,0> ,
                                         <5purp, C  1 C,M,0> ,
                                         <5sctt, C 30 C,D,0> ,
                                         <5sect, C 29 C,D,0> ,
                                         <5reqt, C 28 C,O,0> ,
                                         <5prgs, C 27 C,D,0> ,
                                         <5alrt, C 26 C,O,0> ,
                                         <5extt, C 25 C,O,0> }

purported                  LABEL     = 5purp
                           STRUCTURE = TAG
                           CHILDREN  = { <5atva, U 16 C,M,0> }

(*****************************************************************************)
(* Compare Operation Result                                                  *)
(*****************************************************************************)

CompareResult (OPT-SIGNED) LABEL     = 5cmrs
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5crsu, U 17 C,O,0>,
                                         <5crss, U 16 C,O,0> }

CompareResult (SIGNED)     LABEL     = 5crss
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5crsu, U 17 C,M,0> ,
                                         <5algi, U 16 C,M,0> ,
                                         <5encr, U  3 P,M,0> }

CompareResult              LABEL     = 5crsu
                           STRUCTURE = SET
                           CHILDREN  = { <5dstn, U 16 C,O,0> ,
                                         <5mtct, C  0 C,M,0> ,
                                         <5frot, C  1 C,D,0> ,
                                         <5scpt, C 30 C,O,0> ,
                                         <5perf, C 29 C,O,0> ,
                                         <5alit, C 28 C,D,0> }

matchedTag                 LABEL     = 5mtct
                           STRUCTURE = TAG
                           CHILDREN  = { <5mtch, U 01 P,M,0> }

matched                    LABEL     = 5mtch
                           STRUCTURE = BOOLEAN

fromEntryTag               LABEL     = 5frot
                           STRUCTURE = TAG
                           CHILDREN  = { <5from, U 01 P,M,0> }

fromEntry                  LABEL     = 5from
                           STRUCTURE = BOOLEAN

(*****************************************************************************)
(* Abandon Operation Arguments                                               *)
(*****************************************************************************)

AbandonArgument            LABEL     = 5aban
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5ivid, C  0 C,M,0> }

InvokeID                   LABEL     = 5ivid
                           STRUCTURE = TAG
                           CHILDREN  = { <5inid, C  2 P,M,0> }

(*****************************************************************************)
(* Abandon Operation has no Result                                           *)
(*****************************************************************************)


(*****************************************************************************)
(* Remote Errors                                                             *)
(*****************************************************************************)

AbandonFailed              LABEL     = 5abfl
                           STRUCTURE = SET
                           CHILDREN  = { <5prot, C  0 C,M,0> ,
                                         <5ivid, C  1 C,M,0> }

AttributeError             LABEL     = 5ater
                           STRUCTURE = SET
                           CHILDREN  = { <5objc, C  0 C,M,0> ,
                                         <5prbt, C  1 C,M,0> }

NameError                  LABEL     = 5nmer
                           STRUCTURE = SET
                           CHILDREN  = { <5prot, C  0 C,M,0> ,
                                         <5mtcd, C  1 C,M,0> }

Referral                   LABEL     = 5rfrl
                           STRUCTURE = SET
                           CHILDREN  = { <5ctrt, C  0 C,M,0> }

SecurityError              LABEL     = 5scer
                           STRUCTURE = SET
                           CHILDREN  = { <5prot, C  0 C,M,0> }

ServiceError               LABEL     = 5sver
                           STRUCTURE = SET
                           CHILDREN  = { <5prot, C  0 C,M,0> }

UpdateError                LABEL     = 5uper
                           STRUCTURE = SET
                           CHILDREN  = { <5prot, C  0 C,M,0> }

problemTag                 LABEL     = 5prot
                           STRUCTURE = TAG
                           CHILDREN  = { <5prob, U 02 P,M,0> }

problem                    LABEL     = 5prob
                           STRUCTURE = INTEGER

problemsTag                LABEL     = 5prbt
                           STRUCTURE = TAG
                           CHILDREN  = { <5prbs, U 17 C,M,0> }

problems                   LABEL     = 5prbs
                           STRUCTURE = SET OF
                           CHILDREN  = { <5pros, U 16 C,O,0> }

SEQUENCE {problem,..}      LABEL     = 5pros
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5prot, C  0 C,M,0> ,
                                         <5patt, C  1 C,M,0> ,
                                         <5pavl, C  2 C,O,0> }

AttributeTypeTag           LABEL     = 5patt
                           STRUCTURE = TAG
                           CHILDREN  = { <5paty, U 06 P,M,0> }

AttributeType              LABEL     = 5paty
                           STRUCTURE = OBJECT IDENTIFIER

AttributeValue             LABEL     = 5pavl
                           STRUCTURE = ANY
                           TAG       = (C 2 C)
                           CHILDREN  = { }

matched                    LABEL     = 5mtcd
                           STRUCTURE = CHOICE
                           TAG       = (C 1 C)
                           CHILDREN  = { <5rdns, U 16 C,O,0> }

ContinuationReferenceTag   LABEL     = 5ctrt
                           STRUCTURE = TAG
                           CHILDREN  = { <5ctrf, U 17 C,M,0> }

ServiceControlsTag         LABEL     = 5sctt
                           STRUCTURE = TAG
                           CHILDREN  = { <5sctl, U 17 C,M,0> }

ServiceControls            LABEL     = 5sctl
                           STRUCTURE = SET
                           CHILDREN  = { <5optt, C  0 C,D,0> ,
                                         <5prit, C  1 C,D,0> ,
                                         <5tlit, C  2 C,O,0> ,
                                         <5slit, C  3 C,O,0> ,
                                         <5scot, C  4 C,O,0>E}

optionsTag                 LABEL     = 5optt
                           STRUCTURE = TAG
                           CHILDREN  = { <5opts, U 03 P,M,0> }

options                    LABEL     = 5opts
                           STRUCTURE = BITSTRING

priorityTag                LABEL     = 5prit
                           STRUCTURE = TAG
                           CHILDREN  = { <5prio, U 02 P,M,0> }

priority                   LABEL     = 5prio
                           STRUCTURE = INTEGER

timeLimitTag               LABEL     = 5tlit
                           STRUCTURE = TAG
                           CHILDREN  = { <5tlim, U 02 P,M,0> }

timeLimit                  LABEL     = 5tlim
                           STRUCTURE = INTEGER

sizeLimitTag               LABEL     = 5slit
                           STRUCTURE = TAG
                           CHILDREN  = { <5slim, U 02 P,M,0> }

sizeLimit                  LABEL     = 5slim
                           STRUCTURE = INTEGER

scopeOfReferralTag         LABEL     = 5scot
                           STRUCTURE = TAG
                           CHILDREN  = { <5scop, U 02 P,M,0> }

scopeOfReferral            LABEL     = 5scop
                           STRUCTURE = INTEGER

EntryInfoSelectionTag      LABEL     = 5entt
                           STRUCTURE = TAG
                           CHILDREN  = { <5ents, U 17 C,M,0> }

EntryInformationSelection  LABEL     = 5ents
                           STRUCTURE = SET
                           CHILDREN  = { <5atys, U  0 C,D,0> ,
                                         <5iftt, C  2 C,D,0> }

attributeTypes             LABEL     = 5atys
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5alat, C  0 C,O,0>,
                                         <5sltt, C  1 C,O,0> }

allAttributestag           LABEL     = 5alat
                           STRUCTURE = TAG
                           CHILDREN  = { <5altt, U  5 P,M,0>E}

allAttributes              LABEL     = 5altt
                           STRUCTURE = NULL

selectTag                  LABEL     = 5sltt
                           STRUCTURE = TAG
                           CHILDREN  = { <5slct, U  17 C,M,0> }

select                     LABEL     = 5slct
                           STRUCTURE = SET OF
                           CHILDREN  = { <5atsl, U  6 P,O,0> }

AttributeTypeSelected      LABEL     = 5atsl
                           STRUCTURE = OBJECT IDENTIFIER

infoTypesTag               LABEL     = 5iftt
                           STRUCTURE = TAG
                           CHILDREN  = { <5ifty, U 02 P,M,0> }

infoTypes                  LABEL     = 5ifty
                           STRUCTURE = INTEGER

EntryInformationTag        LABEL     = 5enrt
                           STRUCTURE = TAG
                           CHILDREN  = { <5enti, U 16 C,M,0> }

EntryInformation           LABEL     = 5enti
                           STRUCTURE = SEQUENCE
                           CHILDREN  = { <5dstn, U 16 C,M,0> ,
                                         <5frme, U  1 P,D,0> ,
                                         <5einf, U 17 C,O,0> }

fromEntry                  LABEL     = 5frme
                           STRUCTURE = BOOLEAN

SET OF CHOICE {Type, Attr} LABEL     = 5einf
                           STRUCTURE = SET OF
                           CHILDREN  = { <5eich, U  0 P,O,0> }

CHOICE {AttrType, Attr}    LABEL     = 5eich
                           STRUCTURE = CHOICE
                           CHILDREN  = { <5atty, U  6 P,O,0> ,
                                         <5attr, U 16 C,O,0> }

SecurityParamArgumentTag   LABEL     = 5sect
                           STRUCTURE = TAG
                           CHILDREN  = { <5secp, U 17 C,M,0> }

SecurityParametersArgument LABEL     = 5secp
                           STRUCTURE = SET
                           CHILDREN  = { <5cpth, C  0 C,O,0> ,
                                         <5secn, C  1 C,O,0> ,
                                         <5scti, C  2 P,O,0> ,
                                         <5secr, C  3 P,O,0> ,
                                         <5prtr, C  4 P,O,0> }

SecurityParamResultTag     LABEL     = 5scpt
                           STRUCTURE = TAG
                           CHILDREN  = { <5scpm, U 17 C,M,0> }

SecurityParametersResult   LABEL     = 5scpm
                           STRUCTURE = SET
                           CHILDREN  = { <5cpth, C  0 C,O,0> ,
                                         <5secn, C  1 C,O,0> ,
                                         <5scti, C  2 P,O,0> ,
                                         <5secr, C  3 P,O,0> ,
                                         <5prtr, C  4 P,O,0> }

name                       LABEL     = 5secn
                           STRUCTURE = CHOICE
                           TAG       = (C 1 C)
                           CHILDREN  = { <5rdns, U 16 C,O,0> }

time                       LABEL     = 5scti
                           STRUCTURE = UTC TIME

random                     LABEL     = 5secr
                           STRUCTURE = BITSTRING

ProtectionRequest          LABEL     = 5prtr
                           STRUCTURE = INTEGER

extensionsTag              LABEL     = 5extt
                           STRUCTURE = TAG
                           CHILDREN  = { <5exts, U 17 C,M,0> }

extensions                 LABEL     = 5exts
                           STRUCTURE = SET OF
                           CHILDREN  = { <5xten, U 17 C,O,0> }

Extension                  LABEL     = 5xten
                           STRUCTURE = SET
                           CHILDREN  = { <5xtit, C  0 C,M,0> ,
                                         <5crtt, C  1 C,D,0> ,
                                         <5itet, C  2 C,M,0> }

identifierTag              LABEL     = 5xtit
                           STRUCTURE = TAG
                           CHILDREN  = { <5xtid, U 02 P,M,0> }

identifier                 LABEL     = 5xtid
                           STRUCTURE = INTEGER

criticalTag                LABEL     = 5crtt
                           STRUCTURE = TAG
                           CHILDREN  = { <5crtc, U 01 P,M,0> }

critical                   LABEL     = 5crtc
                           STRUCTURE = BOOLEAN

itemTag                    LABEL     = 5itet
                           STRUCTURE = TAG
                           CHILDREN  = { <5item, U  0 C,M,0> }

item                       LABEL     = 5item
                           STRUCTURE = ANY DEFINED BY
                           TAG       = (C 2 C)
                           DEFGLABEL = 5xtid
                           REGISTER  = {}

(* Not sure that this REGISTER will work. If not then revert to ANY.         *)
!
