Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / openldap / dist / tests / data / test-dn.ldif
blob412a546a23473c204da84d5947eb72eabdd3c403
1 # Tree Structure
2 dn: dc=example,dc=com
3 objectClass: domain
4 objectClass: domainRelatedObject
5 dc: example
6 associatedDomain: example.com
8 dn: ou=LDAPv3,dc=example,dc=com
9 objectClass: organizationalUnit
10 ou: LDAPv3
11 description: RFC 2253 compliant DN string representation
13 dn: cn=Must Succeed,ou=LDAPv3,dc=example,dc=com
14 objectClass: groupOfNames
15 cn: Must Succeed
16 # at least one member must be present; thus we use the entry's DN
17 member: cn=Must Succeed,ou=LDAPv3,dc=example,dc=com
18 # specific DN forms
19 member:
20 member: UID=jsmith,DC=example,DC=net
21 member: OU=Sales+CN=J. Smith,DC=example,DC=net
22 member: CN=John Smith\, III,DC=example,DC=net
23 member: OU=Sales\; Data\+Algorithms,DC=example,DC=net
24 member: CN=Before\0dAfter,DC=example,DC=net
25 member: CN=\23John Smith\20,DC=example,DC=net
26 member: CN=Lu\C4\8Di\C4\87
27 member: testUUID=597ae2f6-16a6-1027-98f4-abcdefABCDEF,DC=Example
28 # DN forms already defined as "member" in a different string representation
29 seeAlso: CN=John Smith\2C III,DC=example,DC=net
30 seeAlso: OU=Sales\3B Data\2BAlgorithms,DC=example,DC=net
31 seeAlso: CN=\#John Smith\ ,DC=example,DC=net
32 # comment
33 description: "member" values contain specific DN forms;
34 description: "seeAlso" values contain DN forms already defined as "member",
35 description: but in a different string representation;
36 description: the following "description" values contain the "member" and
37 description: "seeAlso" DN string representations used above.
38 # list here all string representations used above in "member" and "seeAlso"
39 description: ""
40 description: UID=jsmith,DC=example,DC=net
41 description: OU=Sales+CN=J. Smith,DC=example,DC=net
42 description: CN=John Smith\, III,DC=example,DC=net
43 description: CN=John Smith\2C III,DC=example,DC=net
44 description: OU=Sales\; Data\+Algorithms,DC=example,DC=net
45 description: OU=Sales\3B Data\2BAlgorithms,DC=example,DC=net
46 description: CN=Before\0dAfter,DC=example,DC=net
47 description: CN=\23John Smith\20,DC=example,DC=net
48 description: CN=\#John Smith\ ,DC=example,DC=net
49 description: CN=Lu\C4\8Di\C4\87
50 description: testUUID=597ae2f6-16a6-1027-98f4-abcdefABCDEF,DC=Example
52 dn: cn=Should Succeed,ou=LDAPv3,dc=example,dc=com
53 objectClass: groupOfNames
54 cn: Should Succeed
55 member: cn=Should Succeed,ou=LDAPv3,dc=example,dc=com
56 member: 1.3.6.1.4.1.1466.0=#04024869,DC=example,DC=com
57 member: 1.1.1=
58 description: 1.3.6.1.4.1.1466.0=#04024869,DC=example,DC=com
59 description: 1.1.1=
61 dn: cn=Unescaped Equals,ou=LDAPv3,dc=example,dc=com
62 objectClass: groupOfNames
63 cn: Unescaped Equals
64 member: cn=Unescaped Equals,ou=LDAPv3,dc=example,dc=com
65 member: cn=A*x=b is a linear algebra problem,ou=LDAPv3,dc=example,dc=com
66 description: cn=A*x=b is a linear algebra problem,ou=LDAPv3,dc=example,dc=com // unescaped EQUALS
68 dn: cn=Must Fail 1,ou=Groups,dc=example,dc=com
69 objectClass: groupOfNames
70 cn: Must Fail 1
71 member: uid;x-option=jsmith
72 description: uid;x-option=jsmith // option
74 dn: cn=Must Fail 2,ou=Groups,dc=example,dc=com
75 objectClass: groupOfNames
76 cn: Must Fail 2
77 member: at_tr=jsmith
78 description: at_tr=jsmith // invalid attribute type name
80 dn: cn=Must Fail 3,ou=Groups,dc=example,dc=com
81 objectClass: groupOfNames
82 cn: Must Fail 3
83 member: -attr=jsmith
84 description: -attr=jsmith // invalid attribute type name
86 dn: cn=Must Fail 4,ou=Groups,dc=example,dc=com
87 objectClass: groupOfNames
88 cn: Must Fail 4
90 dn: cn=Must Fail 5,ou=Groups,dc=example,dc=com
91 objectClass: groupOfNames
92 cn: Must Fail 5
93 member: 1..1=jsmith
94 description: 1..1=jsmith // invalid numeric OID
96 dn: cn=Must Fail 6,ou=Groups,dc=example,dc=com
97 objectClass: groupOfNames
98 cn: Must Fail 6
99 member: 1.1.=jsmith
100 description: 1.1.=jsmith // invalid numeric OID
102 dn: cn=Must Fail 7,ou=Groups,dc=example,dc=com
103 objectClass: groupOfNames
104 cn: Must Fail 7
105 member: 01.1=jsmith
106 description: 01.1=jsmith // invalid numeric OID
108 dn: cn=Must Fail 8,ou=Groups,dc=example,dc=com
109 objectClass: groupOfNames
110 cn: Must Fail 8
111 member: 1.ff=jsmith
112 description: 1.ff=jsmith // invalid numeric OID
114 dn: cn=Must Fail 9,ou=Groups,dc=example,dc=com
115 objectClass: groupOfNames
116 cn: Must Fail 9
117 member: 1.1.1=#GG
118 description: 1.1.1=#GG // invalid HEX form
120 dn: cn=Must Fail 10,ou=Groups,dc=example,dc=com
121 objectClass: groupOfNames
122 cn: Must Fail 10
123 member: 1.1.1=#000
124 description: 1.1.1=#000 // invalid HEX form
126 dn: cn=Must Fail 11,ou=Groups,dc=example,dc=com
127 objectClass: groupOfNames
128 cn: Must Fail 11
129 member: 1.1.1=#F
130 description: 1.1.1=#F // invalid HEX form
132 dn: cn=Must Fail 12,ou=Groups,dc=example,dc=com
133 objectClass: groupOfNames
134 cn: Must Fail 12
135 member: 1.1.1=#
136 description: 1.1.1=# // invalid HEX form
138 dn: cn=Must Fail 13,ou=Groups,dc=example,dc=com
139 objectClass: groupOfNames
140 cn: Must Fail 13
141 member: UID=jsmith,,DC=example,DC=net
142 description: UID=jsmith,,DC=example,DC=net // extra comma
144 dn: cn=Must Fail 14,ou=Groups,dc=example,dc=com
145 objectClass: groupOfNames
146 cn: Must Fail 14
147 member: UID=john,smith
148 description: UID=john,smith // unescaped ,
150 dn: cn=Must Fail 15,ou=Groups,dc=example,dc=com
151 objectClass: groupOfNames
152 cn: Must Fail 15
153 member: UID=john+smith
154 description: UID=john+smith // unescaped +
156 dn: cn=Must Fail 16,ou=Groups,dc=example,dc=com
157 objectClass: groupOfNames
158 cn: Must Fail 16
159 member: UID=john\?smith
160 description: UID=john\?smith // invalid escape of ? or unescaped \
162 dn: cn=Must Fail 17,ou=Groups,dc=example,dc=com
163 objectClass: groupOfNames
164 cn: Must Fail 17
165 member: UID=john\Fsmith
166 description: UID=john\Fsmith // invalid HEX escape
168 dn: cn=Must Fail 18,ou=Groups,dc=example,dc=com
169 objectClass: groupOfNames
170 cn: Must Fail 18
171 member: UID=john\GGsmith
172 description: UID=john\GGsmith // invalid HEX escape
174 # String representations we should accept for compatibility with RFC1779
175 dn: ou=LDAPv2,dc=example,dc=com
176 objectClass: organizationalUnit
177 ou: LDAPv2
178 description: RFC 1779 compliant DN string representation
180 dn: cn=May Succeed 1,ou=LDAPv2,dc=example,dc=com
181 objectClass: groupOfNames
182 cn: May Succeed 1
183 member:
184 description: " " // space, quote characters (") are not part of the string
186 dn: cn=May Succeed 2,ou=LDAPv2,dc=example,dc=com
187 objectClass: groupOfNames
188 cn: May Succeed 2
189 member: OID.0.9.2342.19200300.100.1.1=jsmith
190 description: OID.0.9.2342.19200300.100.1.1=jsmith // invalid attribute type name
192 dn: cn=May Succeed 3,ou=LDAPv2,dc=example,dc=com
193 objectClass: groupOfNames
194 cn: May Succeed 3
195 member: UID=jsmith, O=example, C=US
196 description: UID=jsmith, O=example, C=US // spaces
198 dn: cn=May Succeed 4,ou=LDAPv2,dc=example,dc=com
199 objectClass: groupOfNames
200 cn: May Succeed 4
201 member: UID=jsmith;O=example;C=US
202 description: UID=jsmith;O=example;C=US // semi-colons
204 dn: cn=May Succeed 5,ou=LDAPv2,dc=example,dc=com
205 objectClass: groupOfNames
206 cn: May Succeed 5
207 member: <UID=jsmith,O=example,C=US>
208 description: <UID=jsmith,O=example,C=US> // brackets
210 dn: cn=May Succeed 6,ou=LDAPv2,dc=example,dc=com
211 objectClass: groupOfNames
212 cn: May Succeed 6
213 member: CN="John Smith",O=example,C=US
214 description: CN="John Smith",O=example,C=US // quotes
216 # Other DN-related syntaxes
217 dn: ou=Related Syntaxes,dc=example,dc=com
218 objectClass: organizationalUnit
219 ou: Related Syntaxes
221 # Name and Optional UID
222 dn: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
223 objectClass: groupOfUniqueNames
224 cn: Name and Optional UID
225 uniqueMember: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
226 uniqueMember: #'1'B
227 uniqueMember: #'0010'B
228 uniqueMember: dc=example,dc=com#'1000'B
229 uniqueMember: dc=example,dc=com#'0'B
230 description: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com // only DN portion
231 description: #'1'B // empty "" DN
232 description: #'0010'B // empty "" DN with leading '0's
233 description: dc=example,dc=com#'1000'B // with DN portion
234 description: dc=example,dc=com#'0'B // with DN portion and just one '0'
236 dn: cn=Should Fail 1,cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
237 objectClass: groupOfUniqueNames
238 cn: Should Fail 1
239 uniqueMember: #'1234'B
240 description: #'1234'B // illegal digits other than '0' and '1'
242 dn: cn=Should Fail 2,cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
243 objectClass: groupOfUniqueNames
244 cn: Should Fail 2
245 uniqueMember: #'12ABCD'B
246 description: #'12ABCD'B // illegal digits and chars other than '0' and '1'
248 dn: cn=Should Parse as DN,cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
249 objectClass: groupOfUniqueNames
250 cn: Should Parse as DN
251 uniqueMember: dc=example,dc=com#0'B
252 uniqueMember: dc=example,dc=com#'0B
253 uniqueMember: dc=example,dc=com '0'B
254 description: dc=example,dc=com#0'B // malformed UID?
255 description: dc=example,dc=com#'0B // malformed UID?
256 description: dc=example,dc=com '0'B // malformed UID?
258 # UID=jsmith,DC=example,DC=net [AoOn]
259 # 304631133011060A0992268993F22C64011916036E657431 [AoO]
260 # 173015060A0992268993F22C64011916076578616D706C65
261 # 31163014060A0992268993F22C64010113066A736D697468
263 # OU=Sales+CN=J. Smith,DC=example,DC=net [AoOn]
264 # 304F31133011060A0992268993F22C64011916036E657431 [AoO]
265 # 173015060A0992268993F22C64011916076578616D706C65
266 # 311F300C060355040B130553616C6573300F060355040313
267 # 084A2E20536D697468
269 # CN=John Smith\, III,DC=example,DC=net [AoOn]
270 # 304831133011060A0992268993F22C64011916036E657431 [AoO]
271 # 173015060A0992268993F22C64011916076578616D706C65
272 # 311830160603550403130F4A6F686E20536D6974682C2049
273 # 4949
275 # CN=John Smith\2C III,DC=example,DC=net [AoOn]
276 # 304831133011060A0992268993F22C64011916036E657431 [AoO]
277 # 173015060A0992268993F22C64011916076578616D706C65
278 # 311830160603550403130F4A6F686E20536D6974682C2049
279 # 4949
281 # CN=Before\0dAfter,DC=example,DC=net [AoOn]
282 # 304531133011060A0992268993F22C64011916036E657431 [AoO]
283 # 173015060A0992268993F22C64011916076578616D706C65
284 # 3115301306035504030C0C4265666F72650D4166746572
286 # CN=\23John Smith\20,DC=example,DC=net [AoOn]
287 # 304531133011060A0992268993F22C64011916036E657431 [AoO]
288 # 173015060A0992268993F22C64011916076578616D706C65
289 # 311530130603550403140C234A6F686E20536D69746820
291 # CN=\#John Smith\ ,DC=example,DC=net [AoOn]
292 # 304531133011060A0992268993F22C64011916036E657431 [AoO]
293 # 173015060A0992268993F22C64011916076578616D706C65
294 # 311530130603550403140C234A6F686E20536D69746820
296 # FIXME: currently doesn't work
297 # 1.3.6.1.4.1.1466.0=#04024869,DC=example,DC=com [AoOn]
298 # 304031133011060A0992268993F22C64011916036E657431 [AoO]
299 # 173015060A0992268993F22C64011916076578616D706C65
300 # 3110300E06082B060104018B3A0004024869
302 # CN=Lu\C4\8Di\C4\87 [AoOn]
303 # 30123110300E06035504030C074C75C48D69C487 [AoO]
305 # FIXME: currently doesn't work
306 # 1.1.1= // empty value [AoO]
307 # 300A31083006060229011300 [AoO]
309 #Invalid DNs
310 # // some implementations may be liberal in what they accept
311 # // but should strict in what they produce.
313 # uid;x-option=jsmith // option [oOn]
315 # at_tr=jsmith // invalid attribute type name [AoOn]
317 # -attr=jsmith // invalid attribute type name [AoOn]
319 # 1..1=jsmith // invalid numeric OID [AoO]
321 # 1.1.=jsmith // invalid numeric OID [AoO]
323 # 01.1=jsmith // invalid numeric OID [oO]
325 # 1.ff=jsmith // invalid numeric OID [AoOn]
327 # 1.1.1=#GG // invalid HEX form [AoOn]
329 # 1.1.1=#000 // invalid HEX form [AoO]
331 # 1.1.1=#F // invalid HEX form [AoO]
333 # 1.1.1=# // invalid HEX form [AoO]
335 # UID=jsmith,,DC=example,DC=net // extra comma [AoOn]
337 # UID=john,smith // unescaped , [AoOn]
339 # UID=john+smith // unescaped + [AoOn]
341 # UID=john\?smith // invalid escape of ? or unescaped \ [oOn]
343 # UID=john\Fsmith // invalid hex escape [AoOn]
345 # UID=john\GGsmith // invalid hex escape [oOn]
347 #The following strings are invalid for use in LDAPv3, but were
348 #legal in LDAPv2 (RFC 1779). Some LDAPv3 implementations are
349 #liberal in accepting these but should not generate them.
351 # " " // space, quote characters (") are not part of the string
353 # OID.1.1=jsmith // invalid attribute type name
355 # UID=jsmith, O=example, C=US // spaces
357 # UID=jsmith;O=example;C=US // semi-colons
359 # <UID=jsmith,O=example,C=US> // brackets [AoOn]
361 # CN="John Smith",O=example,C=US // quotes