2 " Language: ldap.conf(5) configuration file.
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-12-11
6 if exists("b:current_syntax")
13 syn keyword ldapconfTodo contained TODO FIXME XXX NOTE
15 syn region ldapconfComment display oneline start='^\s*#' end='$'
16 \ contains=ldapconfTodo,
19 syn match ldapconfBegin display '^'
20 \ nextgroup=ldapconfOption,
26 syn keyword ldapconfOption contained URI
27 \ nextgroup=ldapconfURI
30 syn keyword ldapconfOption contained
33 \ nextgroup=ldapconfDNAttrType
36 syn keyword ldapconfDeprOption contained
38 \ nextgroup=ldapconfHost
41 syn keyword ldapconfDeprOption contained
43 \ nextgroup=ldapconfPort
46 syn keyword ldapconfOption contained
48 \ nextgroup=ldapconfBoolean
51 syn keyword ldapconfOption contained
54 \ nextgroup=ldapconfInteger
57 syn keyword ldapconfOption contained
59 \ nextgroup=ldapconfDerefWhen
62 syn keyword ldapconfOption contained
64 \ nextgroup=ldapconfSASLMechanism
67 syn keyword ldapconfOption contained
69 \ nextgroup=ldapconfSASLRealm
72 syn keyword ldapconfOption contained
75 \ nextgroup=ldapconfSASLAuthID
78 syn keyword ldapconfOption contained
80 \ nextgroup=ldapconfSASLSecProps
83 syn keyword ldapconfOption contained
88 \ nextgroup=ldapconfFilename
91 syn keyword ldapconfOption contained
93 \ nextgroup=ldapconfPath
96 syn keyword ldapconfOption contained
98 \ nextgroup=@ldapconfTLSCipher
101 syn keyword ldapconfOption contained
103 \ nextgroup=ldapconfTLSCertCheck
106 syn keyword ldapconfOption contained
108 \ nextgroup=ldapconfTLSCRLCheck
113 syn match ldapconfURI contained display
114 \ 'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\='
115 \ nextgroup=ldapconfURI
118 " LDAP Distinguished Names are defined in Section 3 of RFC 2253:
119 " http://www.ietf.org/rfc/rfc2253.txt.
120 syn match ldapconfDNAttrType contained display
121 \ '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*'
122 \ nextgroup=ldapconfDNAttrTypeEq
124 syn match ldapconfDNAttrTypeEq contained display
126 \ nextgroup=ldapconfDNAttrValue
128 syn match ldapconfDNAttrValue contained display
129 \ '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"'
130 \ nextgroup=ldapconfDNSeparator
132 syn match ldapconfDNSeparator contained display
134 \ nextgroup=ldapconfDNAttrType
136 syn match ldapconfHost contained display
137 \ '[^[:space:]:]\+\%(:\d\+\)\='
138 \ nextgroup=ldapconfHost
141 syn match ldapconfPort contained display
144 syn keyword ldapconfBoolean contained
152 syn match ldapconfInteger contained display
155 syn keyword ldapconfDerefWhen contained
161 " Taken from http://www.iana.org/assignments/sasl-mechanisms.
162 syn keyword ldapconfSASLMechanism contained
176 syn match ldapconfSASLMechanism contained display
177 \ 'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH'
179 " TODO: I have been unable to find a definition for a SASL realm,
180 " authentication identity, and proxy authorization identity.
181 syn match ldapconfSASLRealm contained display
184 syn match ldapconfSASLAuthID contained display
187 syn keyword ldapconfSASLSecProps contained
195 \ nextgroup=ldapconfSASLSecPSep
197 syn keyword ldapconfSASLSecProps contained
201 \ nextgroup=ldapconfSASLSecPEq
203 syn match ldapconfSASLSecPEq contained display
205 \ nextgroup=ldapconfSASLSecFactor
207 syn match ldapconfSASLSecFactor contained display
209 \ nextgroup=ldapconfSASLSecPSep
211 syn match ldapconfSASLSecPSep contained display
213 \ nextgroup=ldapconfSASLSecProps
215 syn match ldapconfFilename contained display
218 syn match ldapconfPath contained display
221 " Defined in openssl-ciphers(1).
222 " TODO: Should we include the stuff under CIPHER SUITE NAMES?
223 syn cluster ldapconfTLSCipher contains=ldapconfTLSCipherOp,
224 \ ldapconfTLSCipherName,
225 \ ldapconfTLSCipherSort
227 syn match ldapconfTLSCipherOp contained display
229 \ nextgroup=ldapconfTLSCipherName
231 syn keyword ldapconfTLSCipherName contained
233 \ COMPLEMENTOFDEFAULT
274 \ nextgroup=ldapconfTLSCipherSep
276 syn match ldapconfTLSCipherSort contained display
278 \ nextgroup=ldapconfTLSCipherSep
280 syn match ldapconfTLSCipherSep contained display
282 \ nextgroup=@ldapconfTLSCipher
284 syn keyword ldapconfTLSCertCheck contained
291 syn keyword ldapconfTLSCRLCheck contained
296 hi def link ldapconfTodo Todo
297 hi def link ldapconfComment Comment
298 hi def link ldapconfOption Keyword
299 hi def link ldapconfDeprOption Error
300 hi def link ldapconfString String
301 hi def link ldapconfURI ldapconfString
302 hi def link ldapconfDNAttrType Identifier
303 hi def link ldapconfOperator Operator
304 hi def link ldapconfEq ldapconfOperator
305 hi def link ldapconfDNAttrTypeEq ldapconfEq
306 hi def link ldapconfValue ldapconfString
307 hi def link ldapconfDNAttrValue ldapconfValue
308 hi def link ldapconfSeparator ldapconfOperator
309 hi def link ldapconfDNSeparator ldapconfSeparator
310 hi def link ldapconfHost ldapconfURI
311 hi def link ldapconfNumber Number
312 hi def link ldapconfPort ldapconfNumber
313 hi def link ldapconfBoolean Boolean
314 hi def link ldapconfInteger ldapconfNumber
315 hi def link ldapconfType Type
316 hi def link ldapconfDerefWhen ldapconfType
317 hi def link ldapconfDefine Define
318 hi def link ldapconfSASLMechanism ldapconfDefine
319 hi def link ldapconfSASLRealm ldapconfURI
320 hi def link ldapconfSASLAuthID ldapconfValue
321 hi def link ldapconfSASLSecProps ldapconfType
322 hi def link ldapconfSASLSecPEq ldapconfEq
323 hi def link ldapconfSASLSecFactor ldapconfNumber
324 hi def link ldapconfSASLSecPSep ldapconfSeparator
325 hi def link ldapconfFilename ldapconfString
326 hi def link ldapconfPath ldapconfFilename
327 hi def link ldapconfTLSCipherOp ldapconfOperator
328 hi def link ldapconfTLSCipherName ldapconfDefine
329 hi def link ldapconfSpecial Special
330 hi def link ldapconfTLSCipherSort ldapconfSpecial
331 hi def link ldapconfTLSCipherSep ldapconfSeparator
332 hi def link ldapconfTLSCertCheck ldapconfType
333 hi def link ldapconfTLSCRLCheck ldapconfType
335 let b:current_syntax = "ldapconf"
337 let &cpo = s:cpo_save