|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T q
Length: 10064 (0x2750) Types: TextFile Names: »qu-enc.py«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/dsap/x500as/qu-enc.py«
-- quipu-enc.py - additional QUIPU directory type definitions module -- $Header: /f/osi/dsap/x500as/RCS/qu-enc.py,v 7.0 89/11/23 21:50:47 mrose Rel $ -- -- -- $Log: qu-enc.py,v $ -- Revision 7.0 89/11/23 21:50:47 mrose -- Release 6.0 -- -- -- NOTICE -- -- Acquisition, use, and distribution of this module and related -- materials are subject to the restrictions of a license agreement. -- Consult the Preface in the User's Manual for the full terms of -- this agreement. -- -- Quipu { ccitt data(9) pss(2342) ucl(19200300) quipu(99) directoryDefinitions(1) } DEFINITIONS ::= %{ #include <stdio.h> #include "quipu/util.h" #include "quipu/entry.h" #include "quipu/authen.h" extern LLog * log_dsap; #define encode_UNIV_PrintableString build_UNIV_PrintableString #define encode_UNIV_UTCTime build_UNIV_UTCTime %} PREFIXES encode decode print BEGIN IMPORTS NameError , ServiceError , SecurityError FROM DAS { joint-iso-ccitt ds(5) modules(1) directoryAbstractService(2) } DistinguishedName , RelativeDistinguishedName , Attribute , AttributeType FROM IF { joint-iso-ccitt ds(5) modules(1) informationFramework(1) } AlgorithmIdentifier FROM AF { joint-iso-ccitt ds(5) modules(1) authenticationFramework(7) }; -- ReliableROSData -- ::= -- SEQUENCE -- { -- rosOperation -- INTEGER , -- the operation being applied -- data -- ANY , -- the Operation Argument -- oldVersion -- ANY , -- data version to which operation should be applied -- newVersion -- ANY -- version number which results from operation -- } ENCODER encode AccessSelector [[P struct acl_info *]] ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode AccessSelector")); %} CHOICE <<parm->acl_selector_type + 1>> { entry [0] NULL , other [2] NULL , prefix [3] NameList [[p parm->acl_name]] , group [4] NameList [[p parm->acl_name]] } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode AccessSelector")); %} AccessCategories [[P u_char]] ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode AccessCategories")); %} ENUMERATED [[i parm]] { none (0) , detect (1) , compare (2) , read (3) , add (4) , write (5) } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode AccessCategories")); %} ACLInfo [[P struct acl_info *]] %{ struct acl_info * ai_tmp; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode ACLInfo")); %} SET OF <<ai_tmp=parm; ai_tmp != NULLACL_INFO; ai_tmp=ai_tmp->acl_next>> SEQUENCE { AccessSelector [[p ai_tmp]] , AccessCategories [[p ai_tmp->acl_categories]] } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode ACLInfo")); %} AttributeACL [[P struct acl_attr *]] %{ struct oid_seq * os_tmp; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode AttributeACL")); %} SEQUENCE { SET OF <<os_tmp=parm->aa_types; os_tmp != NULLOIDSEQ; os_tmp=os_tmp->oid_next>> -- AttributeType OBJECT IDENTIFIER [[O os_tmp->oid_oid]] , ACLInfo [[p parm->aa_acl]] -- DEFAULT {{other , read}, {entry, write}} OPTIONAL <<test_acl_default(parm->aa_acl) != OK>> } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode AttributeACL")); %} ACLSyntax [[P struct acl *]] %{ struct acl_attr * aa_tmp; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode ACLSyntax")); %} SEQUENCE { childACL [0] ACLInfo [[p parm->ac_child]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_child) != OK>> , entryACL [1] ACLInfo [[p parm->ac_entry]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_entry) != OK>> , defaultAttributeACL [2] ACLInfo [[p parm->ac_default]] -- DEFAULT {{other , read}, {entry, write}} , OPTIONAL <<test_acl_default(parm->ac_default) != OK>> , [3] SET OF <<aa_tmp=parm->ac_attributes; aa_tmp!=NULLACL_ATTR; aa_tmp=aa_tmp->aa_next>> AttributeACL [[p aa_tmp]] } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode ACLSyntax")); %} NameList [[P struct dn_seq *]] %{ struct dn_seq * dns_tmp; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode NameList")); %} SET OF <<dns_tmp=parm; dns_tmp!=NULLDNSEQ; dns_tmp=dns_tmp->dns_next>> DistinguishedName [[p dns_tmp->dns_dn]] %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode NameList")); %} EDBInfoSyntax [[P struct edb_info *]] ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode EDBInfoSyntax")); %} SEQUENCE { edb DistinguishedName [[p parm->edb_name]] , getFromDSA DistinguishedName [[p parm->edb_getfrom]] OPTIONAL <<parm->edb_getfrom != NULLDN>> , sendToDSAs NameList [[p parm->edb_sendto]] , getEDBAllowed NameList [[p parm->edb_allowed]] } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode EDBInfoSyntax")); %} TreeStructureSyntax [[P struct tree_struct *]] %{ OID oid_tmp; int do_once; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode TreeStructureSyntax")); if (parm->tree_object == NULLOBJECTCLASS) { DLOG(log_dsap, LLOG_DEBUG, ("NULL OID in tree structure")); oid_tmp = NULLOID; } else { oid_tmp = oid_cpy(parm->tree_object->oc_ot.ot_oid); DLOG(log_dsap, LLOG_DEBUG, ("oc encodes as oid: %s", sprintoid(oid_tmp))); } %} SET { mandatoryObjectClasses [1] SET OF %{ DLOG(log_dsap, LLOG_DEBUG, ("Another mandatory oc")); %} <<do_once = 1; do_once != 0; do_once = 0>> OBJECT IDENTIFIER [[O oid_tmp]] , optionalObjectClasses [2] SET OF OBJECT IDENTIFIER -- OPTIONAL <<FALSE>> , OPTIONAL , permittedRDNs [3] SET OF SET OF AttributeType [[p NULLAttrT]] } %{ if(oid_tmp != NULLOID) oid_free (oid_tmp); DLOG(log_dsap, LLOG_PDUS, ("Done encode TreeStructureSyntax")); %} EntryDataBlock [[P struct entry *]] %{ struct entry * ent_tmp; %} ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode EntryDataBlock")); %} SEQUENCE OF <<ent_tmp = parm; ent_tmp != NULLENTRY; ent_tmp=ent_tmp->e_sibling>> RelativeEntry [[p ent_tmp]] %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode EntryDataBlock")); %} RelativeEntry [[P struct entry *]] %{ Attr_Sequence as_tmp; %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode RelativeEntry")); %} SEQUENCE { RelativeDistinguishedName [[p parm->e_name]] , SET OF <<as_tmp = parm->e_attributes; as_tmp != NULLATTR; as_tmp=as_tmp->attr_link>> Attribute [[p as_tmp]] } %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode RelativeEntry")); %} EDBVersion [[P char *]] %{ %} ::= %{ DLOG(log_dsap, LLOG_PDUS, ("About to encode EDBVersion")); if(parm == NULLCP) LLOG(log_dsap, LLOG_EXCEPTIONS, ("NULL CP Version encoded!")); %} UTCTime [[s parm]] %{ DLOG(log_dsap, LLOG_PDUS, ("Done encode EDBVersion")); %} GetEntryDataBlockArgument [[P struct getedb_arg *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode GetEntryDataBlockArgument")); %} SET { entry [0] DistinguishedName [[p parm->ga_entry]] , sendIfMoreRecentThan [1] EDBVersion [[p parm->ga_version]] OPTIONAL <<parm->ga_version != NULL>> -- if omitted, send in any case } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode GetEntryDataBlockArgument")); %} GetEntryDataBlockResult [[P struct getedb_result *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode GetEntryDataBlockResult")); %} SEQUENCE { versionHeld [0] EDBVersion [[p parm->gr_version]] , [1] EntryDataBlock [[p parm->gr_edb]] OPTIONAL <<parm->gr_edb != NULLENTRY>> } %{ DLOG(log_dsap, LLOG_TRACE, ("Done encode GetEntryDataBlockResult")); %} ProtectedPassword [[P struct protected_password *]] ::= %{ DLOG(log_dsap, LLOG_TRACE, ("About to encode ProtectedPassword")); %} SEQUENCE { algorithm [0] AlgorithmIdentifier [[p (struct alg_id *)0 ]] -- OPTIONAL <<FALSE>>, OPTIONAL , salt [1] SET { time1 [0] UTCTime [[s parm->time1]] OPTIONAL <<parm->time1 != NULLCP>>, time2 [1] UTCTime [[s parm->time2]] OPTIONAL <<parm->time2 != NULLCP>>, random1 [2] BIT STRING -- OPTIONAL <<FALSE>>, OPTIONAL , random2 [3] BIT STRING -- OPTIONAL <<FALSE>> OPTIONAL } OPTIONAL <<(parm->protected != '\0')>>, password [2] OCTET STRING [[o (parm->passwd) $ (parm->n_octets)]] } %{ DLOG(log_dsap, LLOG_TRACE, ("Done decode ProtectedPassword")); %} END