📄 rfc1274.txt
字号:
awk ' BEGIN {Barker & Kille [Page 31]RFC 1274 COSINE and Internet X.500 Schema November 1991 state = "initial" } /^$/ { next } /^Object Class:/ { n = index($0, ":") if (state != "initial") { print "Already got object class " oc print "Got another object class " substr($0, n+1) state = "notOK" exit 1 } oc = substr($0, n+1) state = "gotOC" next } /^Description:/ { n = index($0, ":") if (state != "gotOC") { print "Got Description: " substr($0, n+1) for (i = 0; i < 2 && getline > 0; i++) print $0 print "..." if (state == "initial") print "Expecting Object Class:" else print "Expecting ASN1OCMacro:" state = "notOK" exit 1 } while (getline > 0) if (length($0) > 0) continue else break state = "gotDesc" next } /^ASN1OCMacro:/ { n = index($0, ":") if (state != "gotDesc")Barker & Kille [Page 32]RFC 1274 COSINE and Internet X.500 Schema November 1991 { print "Got ASN1Macro: " substr($0, n+1) for (i = 0; i < 2 && getline > 0; i++) print $0 print "..." if (state == "initial") print "Expecting Object Class:" else print "Expecting Description:" state = "notOK" exit 1 } state = "OK" exit 0 } { print "Parsing has got confused on seeing line: " $0 state = "notOK" exit 1 } END { if (state == "OK") print "Input looks OK" }2. Attribute Type format checker sed 's/ *: */:/' | awk ' BEGIN { state = "initial" } /^$/ { next } /^Attribute Type:/ { n = index($0, ":") if (state != "initial") { got = "Attribute Type:" exit 1 }Barker & Kille [Page 33]RFC 1274 COSINE and Internet X.500 Schema November 1991 state = "gotAT" next } /^Description:/ { n = index($0, ":") if (state != "gotAT") { got = "Description:" exit 1 } while (getline > 0) if (length($0) > 0) continue else break state = "gotDesc" next } /^OCMust:/ { n = index($0, ":") if (state != "gotDesc") { got = "OCMust:" exit 1 } state = "gotOCMust" next } /^OCMay:/ { n = index($0, ":") if (state != "gotOCMust") { got = "OCMay:" exit 1 } state = "gotOCMay" next } /^ASN1ATMacro:/ { n = index($0, ":") if (state != "gotOCMay") { got = "ASN1ATMacro:" exit 1Barker & Kille [Page 34]RFC 1274 COSINE and Internet X.500 Schema November 1991 } state = "OK" exit 0 } { print "Parsing has got confused on seeing line: " $0 state = "notOK" exit 1 } END { if (state == "initial") print "Expecting Attribute Type:" else if (state == "gotAT") print "Expecting Description:" else if (state == "gotDesc") print "Expecting OCMust:" else if (state == "gotOCMust") print "Expecting OCMay:" else if (state == "gotOCMay") print "Expecting ASN1ATMacro:" if (state != "OK") print "Got " got else print "Input looks OK" }APPENDIX C - Summary of all Object Classes and Attribute Types -- Some Important Object Identifiers data OBJECT IDENTIFIER ::= {ccitt 9} pss OBJECT IDENTIFIER ::= {data 2342} ucl OBJECT IDENTIFIER ::= {pss 19200300} pilot OBJECT IDENTIFIER ::= {ucl 100} pilotAttributeType OBJECT IDENTIFIER ::= {pilot 1} pilotAttributeSyntax OBJECT IDENTIFIER ::= {pilot 3} pilotObjectClass OBJECT IDENTIFIER ::= {pilot 4} pilotGroups OBJECT IDENTIFIER ::= {pilot 10} iA5StringSyntax OBJECT IDENTIFIER ::= {pilotAttributeSyntax 4} caseIgnoreIA5StringSyntax OBJECT IDENTIFIER ::= {pilotAttributeSyntax 5}Barker & Kille [Page 35]RFC 1274 COSINE and Internet X.500 Schema November 1991 -- Standard Object Classes top OBJECT-CLASS MUST CONTAIN { objectClass} ::= {objectClass 0} alias OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { aliasedObjectName} ::= {objectClass 1} country OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { countryName} MAY CONTAIN { description, searchGuide} ::= {objectClass 2} locality OBJECT-CLASS SUBCLASS OF top MAY CONTAIN { description, localityName, stateOrProvinceName, searchGuide, seeAlso, streetAddress} ::= {objectClass 3} organization OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { organizationName} MAY CONTAIN { organizationalAttributeSet} ::= {objectClass 4}Barker & Kille [Page 36]RFC 1274 COSINE and Internet X.500 Schema November 1991 organizationalUnit OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { organizationalUnitName} MAY CONTAIN { organizationalAttributeSet} ::= {objectClass 5} person OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName, surname} MAY CONTAIN { description, seeAlso, telephoneNumber, userPassword} ::= {objectClass 6} organizationalPerson OBJECT-CLASS SUBCLASS OF person MAY CONTAIN { localeAttributeSet, organizationalUnitName, postalAttributeSet, telecommunicationAttributeSet, title} ::= {objectClass 7} organizationalRole OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName} MAY CONTAIN { description, localeAttributeSet, organizationalUnitName, postalAttributeSet, preferredDeliveryMethod, roleOccupant, seeAlso, telecommunicationAttributeSet} ::= {objectClass 8}Barker & Kille [Page 37]RFC 1274 COSINE and Internet X.500 Schema November 1991 groupOfNames OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName, member} MAY CONTAIN { description, organizationName, organizationalUnitName, owner, seeAlso, businessCategory} ::= {objectClass 9} residentialPerson OBJECT-CLASS SUBCLASS OF person MUST CONTAIN { localityName} MAY CONTAIN { localeAttributeSet, postalAttributeSet, preferredDeliveryMethod, telecommunicationAttributeSet, businessCategory} ::= {objectClass 10} applicationProcess OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName} MAY CONTAIN { description, localityName, organizationalUnitName, seeAlso} ::= {objectClass 11} applicationEntity OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName, presentationAddress} MAY CONTAIN { description, localityName,Barker & Kille [Page 38]RFC 1274 COSINE and Internet X.500 Schema November 1991 organizationName, organizationalUnitName, seeAlso, supportedApplicationContext} ::= {objectClass 12} dSA OBJECT-CLASS SUBCLASS OF applicationEntity MAY CONTAIN { knowledgeInformation} ::= {objectClass 13} device OBJECT-CLASS SUBCLASS OF top MUST CONTAIN { commonName} MAY CONTAIN { description, localityName, organizationName, organizationalUnitName, owner, seeAlso, serialNumber} ::= {objectClass 14} strongAuthenticationUser OBJEC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -