1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

heimdal_build: autogenerate table files in heimdal/lib/wind/

metze
(This used to be commit f4cfba26aebb18fecdb50478bec9c07d4910ab3b)
This commit is contained in:
Stefan Metzmacher 2008-08-26 11:22:17 +02:00
parent 1f123a8b39
commit a1bbd66b0f
34 changed files with 46097 additions and 26563 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ source/heimdal/lib/krb5/heim_err.?
source/heimdal/lib/krb5/k524_err.?
source/heimdal/lib/krb5/krb5_err.?
source/heimdal/lib/roken/vis.h
source/heimdal/lib/wind/*_table.?
source/include/build.h
config.h
config.h.in

View File

@ -0,0 +1,176 @@
# CompositionExclusions-3.2.0.txt
# Date: 2002-03-19,23:30:28 GMT [MD]
#
# This file lists the characters from the UAX #15 Composition Exclusion Table.
#
# The format of the comments in this file has been updated since the last version,
# CompositionExclusions-3.txt. The only substantive change to this file between that
# version and this one is the addition of U+2ADC FORKING.
#
# For more information, see
# http://www.unicode.org/unicode/reports/tr15/#Primary Exclusion List Table
# ================================================
# (1) Script Specifics
# This list of characters cannot be derived from the UnicodeData file.
# ================================================
0958 # DEVANAGARI LETTER QA
0959 # DEVANAGARI LETTER KHHA
095A # DEVANAGARI LETTER GHHA
095B # DEVANAGARI LETTER ZA
095C # DEVANAGARI LETTER DDDHA
095D # DEVANAGARI LETTER RHA
095E # DEVANAGARI LETTER FA
095F # DEVANAGARI LETTER YYA
09DC # BENGALI LETTER RRA
09DD # BENGALI LETTER RHA
09DF # BENGALI LETTER YYA
0A33 # GURMUKHI LETTER LLA
0A36 # GURMUKHI LETTER SHA
0A59 # GURMUKHI LETTER KHHA
0A5A # GURMUKHI LETTER GHHA
0A5B # GURMUKHI LETTER ZA
0A5E # GURMUKHI LETTER FA
0B5C # ORIYA LETTER RRA
0B5D # ORIYA LETTER RHA
0F43 # TIBETAN LETTER GHA
0F4D # TIBETAN LETTER DDHA
0F52 # TIBETAN LETTER DHA
0F57 # TIBETAN LETTER BHA
0F5C # TIBETAN LETTER DZHA
0F69 # TIBETAN LETTER KSSA
0F76 # TIBETAN VOWEL SIGN VOCALIC R
0F78 # TIBETAN VOWEL SIGN VOCALIC L
0F93 # TIBETAN SUBJOINED LETTER GHA
0F9D # TIBETAN SUBJOINED LETTER DDHA
0FA2 # TIBETAN SUBJOINED LETTER DHA
0FA7 # TIBETAN SUBJOINED LETTER BHA
0FAC # TIBETAN SUBJOINED LETTER DZHA
0FB9 # TIBETAN SUBJOINED LETTER KSSA
FB1D # HEBREW LETTER YOD WITH HIRIQ
FB1F # HEBREW LIGATURE YIDDISH YOD YOD PATAH
FB2A # HEBREW LETTER SHIN WITH SHIN DOT
FB2B # HEBREW LETTER SHIN WITH SIN DOT
FB2C # HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT
FB2D # HEBREW LETTER SHIN WITH DAGESH AND SIN DOT
FB2E # HEBREW LETTER ALEF WITH PATAH
FB2F # HEBREW LETTER ALEF WITH QAMATS
FB30 # HEBREW LETTER ALEF WITH MAPIQ
FB31 # HEBREW LETTER BET WITH DAGESH
FB32 # HEBREW LETTER GIMEL WITH DAGESH
FB33 # HEBREW LETTER DALET WITH DAGESH
FB34 # HEBREW LETTER HE WITH MAPIQ
FB35 # HEBREW LETTER VAV WITH DAGESH
FB36 # HEBREW LETTER ZAYIN WITH DAGESH
FB38 # HEBREW LETTER TET WITH DAGESH
FB39 # HEBREW LETTER YOD WITH DAGESH
FB3A # HEBREW LETTER FINAL KAF WITH DAGESH
FB3B # HEBREW LETTER KAF WITH DAGESH
FB3C # HEBREW LETTER LAMED WITH DAGESH
FB3E # HEBREW LETTER MEM WITH DAGESH
FB40 # HEBREW LETTER NUN WITH DAGESH
FB41 # HEBREW LETTER SAMEKH WITH DAGESH
FB43 # HEBREW LETTER FINAL PE WITH DAGESH
FB44 # HEBREW LETTER PE WITH DAGESH
FB46 # HEBREW LETTER TSADI WITH DAGESH
FB47 # HEBREW LETTER QOF WITH DAGESH
FB48 # HEBREW LETTER RESH WITH DAGESH
FB49 # HEBREW LETTER SHIN WITH DAGESH
FB4A # HEBREW LETTER TAV WITH DAGESH
FB4B # HEBREW LETTER VAV WITH HOLAM
FB4C # HEBREW LETTER BET WITH RAFE
FB4D # HEBREW LETTER KAF WITH RAFE
FB4E # HEBREW LETTER PE WITH RAFE
# Total code points: 67
# ================================================
# (2) Post Composition Version precomposed characters
# These characters cannot be derived solely from the UnicodeData.txt file
# in this version of Unicode.
# ================================================
2ADC # FORKING
1D15E # MUSICAL SYMBOL HALF NOTE
1D15F # MUSICAL SYMBOL QUARTER NOTE
1D160 # MUSICAL SYMBOL EIGHTH NOTE
1D161 # MUSICAL SYMBOL SIXTEENTH NOTE
1D162 # MUSICAL SYMBOL THIRTY-SECOND NOTE
1D163 # MUSICAL SYMBOL SIXTY-FOURTH NOTE
1D164 # MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
1D1BB # MUSICAL SYMBOL MINIMA
1D1BC # MUSICAL SYMBOL MINIMA BLACK
1D1BD # MUSICAL SYMBOL SEMIMINIMA WHITE
1D1BE # MUSICAL SYMBOL SEMIMINIMA BLACK
1D1BF # MUSICAL SYMBOL FUSA WHITE
1D1C0 # MUSICAL SYMBOL FUSA BLACK
# Total code points: 14
# ================================================
# (3) Singleton Decompositions
# These characters can be derived from the UnicodeData file
# by including all characters whose canonical decomposition
# consists of a single character.
# These characters are simply quoted here for reference.
# ================================================
# 0340..0341 [2] COMBINING GRAVE TONE MARK..COMBINING ACUTE TONE MARK
# 0343 COMBINING GREEK KORONIS
# 0374 GREEK NUMERAL SIGN
# 037E GREEK QUESTION MARK
# 0387 GREEK ANO TELEIA
# 1F71 GREEK SMALL LETTER ALPHA WITH OXIA
# 1F73 GREEK SMALL LETTER EPSILON WITH OXIA
# 1F75 GREEK SMALL LETTER ETA WITH OXIA
# 1F77 GREEK SMALL LETTER IOTA WITH OXIA
# 1F79 GREEK SMALL LETTER OMICRON WITH OXIA
# 1F7B GREEK SMALL LETTER UPSILON WITH OXIA
# 1F7D GREEK SMALL LETTER OMEGA WITH OXIA
# 1FBB GREEK CAPITAL LETTER ALPHA WITH OXIA
# 1FBE GREEK PROSGEGRAMMENI
# 1FC9 GREEK CAPITAL LETTER EPSILON WITH OXIA
# 1FCB GREEK CAPITAL LETTER ETA WITH OXIA
# 1FD3 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
# 1FDB GREEK CAPITAL LETTER IOTA WITH OXIA
# 1FE3 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
# 1FEB GREEK CAPITAL LETTER UPSILON WITH OXIA
# 1FEE..1FEF [2] GREEK DIALYTIKA AND OXIA..GREEK VARIA
# 1FF9 GREEK CAPITAL LETTER OMICRON WITH OXIA
# 1FFB GREEK CAPITAL LETTER OMEGA WITH OXIA
# 1FFD GREEK OXIA
# 2000..2001 [2] EN QUAD..EM QUAD
# 2126 OHM SIGN
# 212A..212B [2] KELVIN SIGN..ANGSTROM SIGN
# 2329 LEFT-POINTING ANGLE BRACKET
# 232A RIGHT-POINTING ANGLE BRACKET
# F900..FA0D [270] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA0D
# FA10 CJK COMPATIBILITY IDEOGRAPH-FA10
# FA12 CJK COMPATIBILITY IDEOGRAPH-FA12
# FA15..FA1E [10] CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPATIBILITY IDEOGRAPH-FA1E
# FA20 CJK COMPATIBILITY IDEOGRAPH-FA20
# FA22 CJK COMPATIBILITY IDEOGRAPH-FA22
# FA25..FA26 [2] CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPATIBILITY IDEOGRAPH-FA26
# FA2A..FA2D [4] CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPATIBILITY IDEOGRAPH-FA2D
# FA30..FA6A [59] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6A
# 2F800..2FA1D [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
# Total code points: 924
# ================================================
# (4) Non-Starter Decompositions
# These characters can be derived from the UnicodeData file
# by including all characters whose canonical decomposition consists
# of a sequence of characters, the first of which has a non-zero
# combining class.
# These characters are simply quoted here for reference.
# ================================================
# 0344 COMBINING GREEK DIALYTIKA TONOS
# 0F73 TIBETAN VOWEL SIGN II
# 0F75 TIBETAN VOWEL SIGN UU
# 0F81 TIBETAN VOWEL SIGN REVERSED II
# Total code points: 4

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
# NormalizationCorrections-4.0.0.txt
#
# This file is a normative contributory data file in the
# Unicode Character Database.
#
# The normalization stabilization policy of the Unicode
# Consortium ordinarily precludes any change to the decomposition
# for any character, once established in a relevant version
# of the UnicodeData.txt data file. However, under certain
# exceptional (and rare) conditions, an error in a decomposition
# mapping may be discovered that is truly just an unintended
# typo in the data, and not a matter of dubious interpretation.
#
# Whenever such an error may be found, and if it meets the
# requirements for possible exceptions to normalization
# stability, the correction is entered in this data file,
# so that any implementation depending on absolute stability
# of normalization, *including* any errors in the data, can
# safely reconstruct the exact state of the data tables at
# any given version of Unicode.
#
# Currently this list has exactly six entries in it, one for the
# typo found and corrected in Corrigendum #3, and five for
# the typos and misidentifications found and corrected in
# Corrigendum #4. All efforts
# will be made to keep the entries limited to just those fixes.
#
# Interpretation of the fields:
# Field 1: Unicode code point
# Field 2: Original (erroneous) decomposition
# Field 3: Corrected decomposition
# Field 4: Version of Unicode for which the correction was
# entered into UnicodeData.txt, in n.n.n format.
# Comment: Indicates the Unicode Corrigendum which documents
# the correction
#
#
F951;96FB;964B;3.2.0 # Corrigendum 3
2F868;2136A;36FC;4.0.0 # Corrigendum 4
2F874;5F33;5F53;4.0.0 # Corrigendum 4
2F91F;43AB;243AB;4.0.0 # Corrigendum 4
2F95F;7AAE;7AEE;4.0.0 # Corrigendum 4
2F9BF;4D57;45D7;4.0.0 # Corrigendum 4

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: UnicodeData.py 22551 2008-02-01 16:22:22Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
def read(filename):
"""return a dict of unicode characters"""
ud = open(filename, 'r')
ret = {}
while True:
l = ud.readline()
if not l:
break
l = re.sub('#.*$', '', l)
if l == "\n":
continue
f = l.split(';')
key = int(f[0], 0x10)
if key in ret:
raise Exception('Duplicate key in UnicodeData')
ret[key] = f[1:]
ud.close()
return ret

File diff suppressed because it is too large Load Diff

View File

@ -1,410 +0,0 @@
/* bidi_table.c */
/* Automatically generated at 2008-03-18T11:38:07.839291 */
#include "bidi_table.h"
const struct range_entry _wind_ral_table[] = {
{0x5be, 1},
{0x5c0, 1},
{0x5c3, 1},
{0x5d0, 0x1b},
{0x5f0, 0x5},
{0x61b, 1},
{0x61f, 1},
{0x621, 0x1a},
{0x640, 0xb},
{0x66d, 0x3},
{0x671, 0x65},
{0x6dd, 1},
{0x6e5, 0x2},
{0x6fa, 0x5},
{0x700, 0xe},
{0x710, 1},
{0x712, 0x1b},
{0x780, 0x26},
{0x7b1, 1},
{0x200f, 1},
{0xfb1d, 1},
{0xfb1f, 0xa},
{0xfb2a, 0xd},
{0xfb38, 0x5},
{0xfb3e, 1},
{0xfb40, 0x2},
{0xfb43, 0x2},
{0xfb46, 0x6c},
{0xfbd3, 0x16b},
{0xfd50, 0x40},
{0xfd92, 0x36},
{0xfdf0, 0xd},
{0xfe70, 0x5},
{0xfe76, 0x87},
};
const size_t _wind_ral_table_size = 34;
const struct range_entry _wind_l_table[] = {
{0x41, 0x1a},
{0x61, 0x1a},
{0xaa, 1},
{0xb5, 1},
{0xba, 1},
{0xc0, 0x17},
{0xd8, 0x1f},
{0xf8, 0x129},
{0x222, 0x12},
{0x250, 0x5e},
{0x2b0, 0x9},
{0x2bb, 0x7},
{0x2d0, 0x2},
{0x2e0, 0x5},
{0x2ee, 1},
{0x37a, 1},
{0x386, 1},
{0x388, 0x3},
{0x38c, 1},
{0x38e, 0x14},
{0x3a3, 0x2c},
{0x3d0, 0x26},
{0x400, 0x83},
{0x48a, 0x45},
{0x4d0, 0x26},
{0x4f8, 0x2},
{0x500, 0x10},
{0x531, 0x26},
{0x559, 0x7},
{0x561, 0x27},
{0x589, 1},
{0x903, 1},
{0x905, 0x35},
{0x93d, 0x4},
{0x949, 0x4},
{0x950, 1},
{0x958, 0xa},
{0x964, 0xd},
{0x982, 0x2},
{0x985, 0x8},
{0x98f, 0x2},
{0x993, 0x16},
{0x9aa, 0x7},
{0x9b2, 1},
{0x9b6, 0x4},
{0x9be, 0x3},
{0x9c7, 0x2},
{0x9cb, 0x2},
{0x9d7, 1},
{0x9dc, 0x2},
{0x9df, 0x3},
{0x9e6, 0xc},
{0x9f4, 0x7},
{0xa05, 0x6},
{0xa0f, 0x2},
{0xa13, 0x16},
{0xa2a, 0x7},
{0xa32, 0x2},
{0xa35, 0x2},
{0xa38, 0x2},
{0xa3e, 0x3},
{0xa59, 0x4},
{0xa5e, 1},
{0xa66, 0xa},
{0xa72, 0x3},
{0xa83, 1},
{0xa85, 0x7},
{0xa8d, 1},
{0xa8f, 0x3},
{0xa93, 0x16},
{0xaaa, 0x7},
{0xab2, 0x2},
{0xab5, 0x5},
{0xabd, 0x4},
{0xac9, 1},
{0xacb, 0x2},
{0xad0, 1},
{0xae0, 1},
{0xae6, 0xa},
{0xb02, 0x2},
{0xb05, 0x8},
{0xb0f, 0x2},
{0xb13, 0x16},
{0xb2a, 0x7},
{0xb32, 0x2},
{0xb36, 0x4},
{0xb3d, 0x2},
{0xb40, 1},
{0xb47, 0x2},
{0xb4b, 0x2},
{0xb57, 1},
{0xb5c, 0x2},
{0xb5f, 0x3},
{0xb66, 0xb},
{0xb83, 1},
{0xb85, 0x6},
{0xb8e, 0x3},
{0xb92, 0x4},
{0xb99, 0x2},
{0xb9c, 1},
{0xb9e, 0x2},
{0xba3, 0x2},
{0xba8, 0x3},
{0xbae, 0x8},
{0xbb7, 0x3},
{0xbbe, 0x2},
{0xbc1, 0x2},
{0xbc6, 0x3},
{0xbca, 0x3},
{0xbd7, 1},
{0xbe7, 0xc},
{0xc01, 0x3},
{0xc05, 0x8},
{0xc0e, 0x3},
{0xc12, 0x17},
{0xc2a, 0xa},
{0xc35, 0x5},
{0xc41, 0x4},
{0xc60, 0x2},
{0xc66, 0xa},
{0xc82, 0x2},
{0xc85, 0x8},
{0xc8e, 0x3},
{0xc92, 0x17},
{0xcaa, 0xa},
{0xcb5, 0x5},
{0xcbe, 1},
{0xcc0, 0x5},
{0xcc7, 0x2},
{0xcca, 0x2},
{0xcd5, 0x2},
{0xcde, 1},
{0xce0, 0x2},
{0xce6, 0xa},
{0xd02, 0x2},
{0xd05, 0x8},
{0xd0e, 0x3},
{0xd12, 0x17},
{0xd2a, 0x10},
{0xd3e, 0x3},
{0xd46, 0x3},
{0xd4a, 0x3},
{0xd57, 1},
{0xd60, 0x2},
{0xd66, 0xa},
{0xd82, 0x2},
{0xd85, 0x12},
{0xd9a, 0x18},
{0xdb3, 0x9},
{0xdbd, 1},
{0xdc0, 0x7},
{0xdcf, 0x3},
{0xdd8, 0x8},
{0xdf2, 0x3},
{0xe01, 0x30},
{0xe32, 0x2},
{0xe40, 0x7},
{0xe4f, 0xd},
{0xe81, 0x2},
{0xe84, 1},
{0xe87, 0x2},
{0xe8a, 1},
{0xe8d, 1},
{0xe94, 0x4},
{0xe99, 0x7},
{0xea1, 0x3},
{0xea5, 1},
{0xea7, 1},
{0xeaa, 0x2},
{0xead, 0x4},
{0xeb2, 0x2},
{0xebd, 1},
{0xec0, 0x5},
{0xec6, 1},
{0xed0, 0xa},
{0xedc, 0x2},
{0xf00, 0x18},
{0xf1a, 0x1b},
{0xf36, 1},
{0xf38, 1},
{0xf3e, 0xa},
{0xf49, 0x22},
{0xf7f, 1},
{0xf85, 1},
{0xf88, 0x4},
{0xfbe, 0x8},
{0xfc7, 0x6},
{0xfcf, 1},
{0x1000, 0x22},
{0x1023, 0x5},
{0x1029, 0x2},
{0x102c, 1},
{0x1031, 1},
{0x1038, 1},
{0x1040, 0x18},
{0x10a0, 0x26},
{0x10d0, 0x29},
{0x10fb, 1},
{0x1100, 0x5a},
{0x115f, 0x44},
{0x11a8, 0x52},
{0x1200, 0x7},
{0x1208, 0x3f},
{0x1248, 1},
{0x124a, 0x4},
{0x1250, 0x7},
{0x1258, 1},
{0x125a, 0x4},
{0x1260, 0x27},
{0x1288, 1},
{0x128a, 0x4},
{0x1290, 0x1f},
{0x12b0, 1},
{0x12b2, 0x4},
{0x12b8, 0x7},
{0x12c0, 1},
{0x12c2, 0x4},
{0x12c8, 0x7},
{0x12d0, 0x7},
{0x12d8, 0x17},
{0x12f0, 0x1f},
{0x1310, 1},
{0x1312, 0x4},
{0x1318, 0x7},
{0x1320, 0x27},
{0x1348, 0x13},
{0x1361, 0x1c},
{0x13a0, 0x55},
{0x1401, 0x276},
{0x1681, 0x1a},
{0x16a0, 0x51},
{0x1700, 0xd},
{0x170e, 0x4},
{0x1720, 0x12},
{0x1735, 0x2},
{0x1740, 0x12},
{0x1760, 0xd},
{0x176e, 0x3},
{0x1780, 0x37},
{0x17be, 0x8},
{0x17c7, 0x2},
{0x17d4, 0x7},
{0x17dc, 1},
{0x17e0, 0xa},
{0x1810, 0xa},
{0x1820, 0x58},
{0x1880, 0x29},
{0x1e00, 0x9c},
{0x1ea0, 0x5a},
{0x1f00, 0x16},
{0x1f18, 0x6},
{0x1f20, 0x26},
{0x1f48, 0x6},
{0x1f50, 0x8},
{0x1f59, 1},
{0x1f5b, 1},
{0x1f5d, 1},
{0x1f5f, 0x1f},
{0x1f80, 0x35},
{0x1fb6, 0x7},
{0x1fbe, 1},
{0x1fc2, 0x3},
{0x1fc6, 0x7},
{0x1fd0, 0x4},
{0x1fd6, 0x6},
{0x1fe0, 0xd},
{0x1ff2, 0x3},
{0x1ff6, 0x7},
{0x200e, 1},
{0x2071, 1},
{0x207f, 1},
{0x2102, 1},
{0x2107, 1},
{0x210a, 0xa},
{0x2115, 1},
{0x2119, 0x5},
{0x2124, 1},
{0x2126, 1},
{0x2128, 1},
{0x212a, 0x4},
{0x212f, 0x3},
{0x2133, 0x7},
{0x213d, 0x3},
{0x2145, 0x5},
{0x2160, 0x24},
{0x2336, 0x45},
{0x2395, 1},
{0x249c, 0x4e},
{0x3005, 0x3},
{0x3021, 0x9},
{0x3031, 0x5},
{0x3038, 0x5},
{0x3041, 0x56},
{0x309d, 0x3},
{0x30a1, 0x5a},
{0x30fc, 0x4},
{0x3105, 0x28},
{0x3131, 0x5e},
{0x3190, 0x28},
{0x31f0, 0x2d},
{0x3220, 0x24},
{0x3260, 0x1c},
{0x327f, 0x32},
{0x32c0, 0xc},
{0x32d0, 0x2f},
{0x3300, 0x77},
{0x337b, 0x63},
{0x33e0, 0x1f},
{0x3400, 0x19b6},
{0x4e00, 0x51a6},
{0xa000, 0x48d},
{0xac00, 0x2ba4},
{0xd800, 0x222e},
{0xfa30, 0x3b},
{0xfb00, 0x7},
{0xfb13, 0x5},
{0xff21, 0x1a},
{0xff41, 0x1a},
{0xff66, 0x59},
{0xffc2, 0x6},
{0xffca, 0x6},
{0xffd2, 0x6},
{0xffda, 0x3},
{0x10300, 0x1f},
{0x10320, 0x4},
{0x10330, 0x1b},
{0x10400, 0x26},
{0x10428, 0x26},
{0x1d000, 0xf6},
{0x1d100, 0x27},
{0x1d12a, 0x3d},
{0x1d16a, 0x9},
{0x1d183, 0x2},
{0x1d18c, 0x1e},
{0x1d1ae, 0x30},
{0x1d400, 0x55},
{0x1d456, 0x47},
{0x1d49e, 0x2},
{0x1d4a2, 1},
{0x1d4a5, 0x2},
{0x1d4a9, 0x4},
{0x1d4ae, 0xc},
{0x1d4bb, 1},
{0x1d4bd, 0x4},
{0x1d4c2, 0x2},
{0x1d4c5, 0x41},
{0x1d507, 0x4},
{0x1d50d, 0x8},
{0x1d516, 0x7},
{0x1d51e, 0x1c},
{0x1d53b, 0x4},
{0x1d540, 0x5},
{0x1d546, 1},
{0x1d54a, 0x7},
{0x1d552, 0x152},
{0x1d6a8, 0x122},
{0x20000, 0xa6d7},
{0x2f800, 0x21e},
{0xf0000, 0xfffe},
{0x100000, 0xfffe},
};
const size_t _wind_l_table_size = 360;

View File

@ -1,21 +0,0 @@
/* bidi_table.h */
/* Automatically generated at 2008-03-18T11:38:07.839121 */
#ifndef BIDI_TABLE_H
#define BIDI_TABLE_H 1
#include <stdint.h>
#include <stddef.h>
struct range_entry {
uint32_t start;
unsigned len;
};
extern const struct range_entry _wind_ral_table[];
extern const struct range_entry _wind_l_table[];
extern const size_t _wind_ral_table_size;
extern const size_t _wind_l_table_size;
#endif /* BIDI_TABLE_H */

View File

@ -1,362 +0,0 @@
/* combining_table.c */
/* Automatically generated at 2008-03-18T11:38:08.166082 */
#include "combining_table.h"
const struct translation _wind_combining_table[] = {
{0x300, 230}, /* Mn */
{0x301, 230}, /* Mn */
{0x302, 230}, /* Mn */
{0x303, 230}, /* Mn */
{0x304, 230}, /* Mn */
{0x305, 230}, /* Mn */
{0x306, 230}, /* Mn */
{0x307, 230}, /* Mn */
{0x308, 230}, /* Mn */
{0x309, 230}, /* Mn */
{0x30a, 230}, /* Mn */
{0x30b, 230}, /* Mn */
{0x30c, 230}, /* Mn */
{0x30d, 230}, /* Mn */
{0x30e, 230}, /* Mn */
{0x30f, 230}, /* Mn */
{0x310, 230}, /* Mn */
{0x311, 230}, /* Mn */
{0x312, 230}, /* Mn */
{0x313, 230}, /* Mn */
{0x314, 230}, /* Mn */
{0x315, 232}, /* Mn */
{0x316, 220}, /* Mn */
{0x317, 220}, /* Mn */
{0x318, 220}, /* Mn */
{0x319, 220}, /* Mn */
{0x31a, 232}, /* Mn */
{0x31b, 216}, /* Mn */
{0x31c, 220}, /* Mn */
{0x31d, 220}, /* Mn */
{0x31e, 220}, /* Mn */
{0x31f, 220}, /* Mn */
{0x320, 220}, /* Mn */
{0x321, 202}, /* Mn */
{0x322, 202}, /* Mn */
{0x323, 220}, /* Mn */
{0x324, 220}, /* Mn */
{0x325, 220}, /* Mn */
{0x326, 220}, /* Mn */
{0x327, 202}, /* Mn */
{0x328, 202}, /* Mn */
{0x329, 220}, /* Mn */
{0x32a, 220}, /* Mn */
{0x32b, 220}, /* Mn */
{0x32c, 220}, /* Mn */
{0x32d, 220}, /* Mn */
{0x32e, 220}, /* Mn */
{0x32f, 220}, /* Mn */
{0x330, 220}, /* Mn */
{0x331, 220}, /* Mn */
{0x332, 220}, /* Mn */
{0x333, 220}, /* Mn */
{0x334, 1}, /* Mn */
{0x335, 1}, /* Mn */
{0x336, 1}, /* Mn */
{0x337, 1}, /* Mn */
{0x338, 1}, /* Mn */
{0x339, 220}, /* Mn */
{0x33a, 220}, /* Mn */
{0x33b, 220}, /* Mn */
{0x33c, 220}, /* Mn */
{0x33d, 230}, /* Mn */
{0x33e, 230}, /* Mn */
{0x33f, 230}, /* Mn */
{0x340, 230}, /* Mn */
{0x341, 230}, /* Mn */
{0x342, 230}, /* Mn */
{0x343, 230}, /* Mn */
{0x344, 230}, /* Mn */
{0x345, 240}, /* Mn */
{0x346, 230}, /* Mn */
{0x347, 220}, /* Mn */
{0x348, 220}, /* Mn */
{0x349, 220}, /* Mn */
{0x34a, 230}, /* Mn */
{0x34b, 230}, /* Mn */
{0x34c, 230}, /* Mn */
{0x34d, 220}, /* Mn */
{0x34e, 220}, /* Mn */
{0x350, 230}, /* Mn */
{0x351, 230}, /* Mn */
{0x352, 230}, /* Mn */
{0x353, 220}, /* Mn */
{0x354, 220}, /* Mn */
{0x355, 220}, /* Mn */
{0x356, 220}, /* Mn */
{0x357, 230}, /* Mn */
{0x35d, 234}, /* Mn */
{0x35e, 234}, /* Mn */
{0x35f, 233}, /* Mn */
{0x360, 234}, /* Mn */
{0x361, 234}, /* Mn */
{0x362, 233}, /* Mn */
{0x363, 230}, /* Mn */
{0x364, 230}, /* Mn */
{0x365, 230}, /* Mn */
{0x366, 230}, /* Mn */
{0x367, 230}, /* Mn */
{0x368, 230}, /* Mn */
{0x369, 230}, /* Mn */
{0x36a, 230}, /* Mn */
{0x36b, 230}, /* Mn */
{0x36c, 230}, /* Mn */
{0x36d, 230}, /* Mn */
{0x36e, 230}, /* Mn */
{0x36f, 230}, /* Mn */
{0x483, 230}, /* Mn */
{0x484, 230}, /* Mn */
{0x485, 230}, /* Mn */
{0x486, 230}, /* Mn */
{0x591, 220}, /* Mn */
{0x592, 230}, /* Mn */
{0x593, 230}, /* Mn */
{0x594, 230}, /* Mn */
{0x595, 230}, /* Mn */
{0x596, 220}, /* Mn */
{0x597, 230}, /* Mn */
{0x598, 230}, /* Mn */
{0x599, 230}, /* Mn */
{0x59a, 222}, /* Mn */
{0x59b, 220}, /* Mn */
{0x59c, 230}, /* Mn */
{0x59d, 230}, /* Mn */
{0x59e, 230}, /* Mn */
{0x59f, 230}, /* Mn */
{0x5a0, 230}, /* Mn */
{0x5a1, 230}, /* Mn */
{0x5a3, 220}, /* Mn */
{0x5a4, 220}, /* Mn */
{0x5a5, 220}, /* Mn */
{0x5a6, 220}, /* Mn */
{0x5a7, 220}, /* Mn */
{0x5a8, 230}, /* Mn */
{0x5a9, 230}, /* Mn */
{0x5aa, 220}, /* Mn */
{0x5ab, 230}, /* Mn */
{0x5ac, 230}, /* Mn */
{0x5ad, 222}, /* Mn */
{0x5ae, 228}, /* Mn */
{0x5af, 230}, /* Mn */
{0x5b0, 10}, /* Mn */
{0x5b1, 11}, /* Mn */
{0x5b2, 12}, /* Mn */
{0x5b3, 13}, /* Mn */
{0x5b4, 14}, /* Mn */
{0x5b5, 15}, /* Mn */
{0x5b6, 16}, /* Mn */
{0x5b7, 17}, /* Mn */
{0x5b8, 18}, /* Mn */
{0x5b9, 19}, /* Mn */
{0x5bb, 20}, /* Mn */
{0x5bc, 21}, /* Mn */
{0x5bd, 22}, /* Mn */
{0x5bf, 23}, /* Mn */
{0x5c1, 24}, /* Mn */
{0x5c2, 25}, /* Mn */
{0x5c4, 230}, /* Mn */
{0x610, 230}, /* Mn */
{0x611, 230}, /* Mn */
{0x612, 230}, /* Mn */
{0x613, 230}, /* Mn */
{0x614, 230}, /* Mn */
{0x615, 230}, /* Mn */
{0x64b, 27}, /* Mn */
{0x64c, 28}, /* Mn */
{0x64d, 29}, /* Mn */
{0x64e, 30}, /* Mn */
{0x64f, 31}, /* Mn */
{0x650, 32}, /* Mn */
{0x651, 33}, /* Mn */
{0x652, 34}, /* Mn */
{0x653, 230}, /* Mn */
{0x654, 230}, /* Mn */
{0x655, 220}, /* Mn */
{0x656, 220}, /* Mn */
{0x657, 230}, /* Mn */
{0x658, 230}, /* Mn */
{0x670, 35}, /* Mn */
{0x6d6, 230}, /* Mn */
{0x6d7, 230}, /* Mn */
{0x6d8, 230}, /* Mn */
{0x6d9, 230}, /* Mn */
{0x6da, 230}, /* Mn */
{0x6db, 230}, /* Mn */
{0x6dc, 230}, /* Mn */
{0x6df, 230}, /* Mn */
{0x6e0, 230}, /* Mn */
{0x6e1, 230}, /* Mn */
{0x6e2, 230}, /* Mn */
{0x6e3, 220}, /* Mn */
{0x6e4, 230}, /* Mn */
{0x6e7, 230}, /* Mn */
{0x6e8, 230}, /* Mn */
{0x6ea, 220}, /* Mn */
{0x6eb, 230}, /* Mn */
{0x6ec, 230}, /* Mn */
{0x6ed, 220}, /* Mn */
{0x711, 36}, /* Mn */
{0x730, 230}, /* Mn */
{0x731, 220}, /* Mn */
{0x732, 230}, /* Mn */
{0x733, 230}, /* Mn */
{0x734, 220}, /* Mn */
{0x735, 230}, /* Mn */
{0x736, 230}, /* Mn */
{0x737, 220}, /* Mn */
{0x738, 220}, /* Mn */
{0x739, 220}, /* Mn */
{0x73a, 230}, /* Mn */
{0x73b, 220}, /* Mn */
{0x73c, 220}, /* Mn */
{0x73d, 230}, /* Mn */
{0x73e, 220}, /* Mn */
{0x73f, 230}, /* Mn */
{0x740, 230}, /* Mn */
{0x741, 230}, /* Mn */
{0x742, 220}, /* Mn */
{0x743, 230}, /* Mn */
{0x744, 220}, /* Mn */
{0x745, 230}, /* Mn */
{0x746, 220}, /* Mn */
{0x747, 230}, /* Mn */
{0x748, 220}, /* Mn */
{0x749, 230}, /* Mn */
{0x74a, 230}, /* Mn */
{0x93c, 7}, /* Mn */
{0x94d, 9}, /* Mn */
{0x951, 230}, /* Mn */
{0x952, 220}, /* Mn */
{0x953, 230}, /* Mn */
{0x954, 230}, /* Mn */
{0x9bc, 7}, /* Mn */
{0x9cd, 9}, /* Mn */
{0xa3c, 7}, /* Mn */
{0xa4d, 9}, /* Mn */
{0xabc, 7}, /* Mn */
{0xacd, 9}, /* Mn */
{0xb3c, 7}, /* Mn */
{0xb4d, 9}, /* Mn */
{0xbcd, 9}, /* Mn */
{0xc4d, 9}, /* Mn */
{0xc55, 84}, /* Mn */
{0xc56, 91}, /* Mn */
{0xcbc, 7}, /* Mn */
{0xccd, 9}, /* Mn */
{0xd4d, 9}, /* Mn */
{0xdca, 9}, /* Mn */
{0xe38, 103}, /* Mn */
{0xe39, 103}, /* Mn */
{0xe3a, 9}, /* Mn */
{0xe48, 107}, /* Mn */
{0xe49, 107}, /* Mn */
{0xe4a, 107}, /* Mn */
{0xe4b, 107}, /* Mn */
{0xeb8, 118}, /* Mn */
{0xeb9, 118}, /* Mn */
{0xec8, 122}, /* Mn */
{0xec9, 122}, /* Mn */
{0xeca, 122}, /* Mn */
{0xecb, 122}, /* Mn */
{0xf18, 220}, /* Mn */
{0xf19, 220}, /* Mn */
{0xf35, 220}, /* Mn */
{0xf37, 220}, /* Mn */
{0xf39, 216}, /* Mn */
{0xf71, 129}, /* Mn */
{0xf72, 130}, /* Mn */
{0xf74, 132}, /* Mn */
{0xf7a, 130}, /* Mn */
{0xf7b, 130}, /* Mn */
{0xf7c, 130}, /* Mn */
{0xf7d, 130}, /* Mn */
{0xf80, 130}, /* Mn */
{0xf82, 230}, /* Mn */
{0xf83, 230}, /* Mn */
{0xf84, 9}, /* Mn */
{0xf86, 230}, /* Mn */
{0xf87, 230}, /* Mn */
{0xfc6, 220}, /* Mn */
{0x1037, 7}, /* Mn */
{0x1039, 9}, /* Mn */
{0x1714, 9}, /* Mn */
{0x1734, 9}, /* Mn */
{0x17d2, 9}, /* Mn */
{0x17dd, 230}, /* Mn */
{0x18a9, 228}, /* Mn */
{0x1939, 222}, /* Mn */
{0x193a, 230}, /* Mn */
{0x193b, 220}, /* Mn */
{0x20d0, 230}, /* Mn */
{0x20d1, 230}, /* Mn */
{0x20d2, 1}, /* Mn */
{0x20d3, 1}, /* Mn */
{0x20d4, 230}, /* Mn */
{0x20d5, 230}, /* Mn */
{0x20d6, 230}, /* Mn */
{0x20d7, 230}, /* Mn */
{0x20d8, 1}, /* Mn */
{0x20d9, 1}, /* Mn */
{0x20da, 1}, /* Mn */
{0x20db, 230}, /* Mn */
{0x20dc, 230}, /* Mn */
{0x20e1, 230}, /* Mn */
{0x20e5, 1}, /* Mn */
{0x20e6, 1}, /* Mn */
{0x20e7, 230}, /* Mn */
{0x20e8, 220}, /* Mn */
{0x20e9, 230}, /* Mn */
{0x20ea, 1}, /* Mn */
{0x302a, 218}, /* Mn */
{0x302b, 228}, /* Mn */
{0x302c, 232}, /* Mn */
{0x302d, 222}, /* Mn */
{0x302e, 224}, /* Mn */
{0x302f, 224}, /* Mn */
{0x3099, 8}, /* Mn */
{0x309a, 8}, /* Mn */
{0xfb1e, 26}, /* Mn */
{0xfe20, 230}, /* Mn */
{0xfe21, 230}, /* Mn */
{0xfe22, 230}, /* Mn */
{0xfe23, 230}, /* Mn */
{0x1d165, 216}, /* Mc */
{0x1d166, 216}, /* Mc */
{0x1d167, 1}, /* Mn */
{0x1d168, 1}, /* Mn */
{0x1d169, 1}, /* Mn */
{0x1d16d, 226}, /* Mc */
{0x1d16e, 216}, /* Mc */
{0x1d16f, 216}, /* Mc */
{0x1d170, 216}, /* Mc */
{0x1d171, 216}, /* Mc */
{0x1d172, 216}, /* Mc */
{0x1d17b, 220}, /* Mn */
{0x1d17c, 220}, /* Mn */
{0x1d17d, 220}, /* Mn */
{0x1d17e, 220}, /* Mn */
{0x1d17f, 220}, /* Mn */
{0x1d180, 220}, /* Mn */
{0x1d181, 220}, /* Mn */
{0x1d182, 220}, /* Mn */
{0x1d185, 230}, /* Mn */
{0x1d186, 230}, /* Mn */
{0x1d187, 230}, /* Mn */
{0x1d188, 230}, /* Mn */
{0x1d189, 230}, /* Mn */
{0x1d18a, 220}, /* Mn */
{0x1d18b, 220}, /* Mn */
{0x1d1aa, 230}, /* Mn */
{0x1d1ab, 230}, /* Mn */
{0x1d1ac, 230}, /* Mn */
{0x1d1ad, 230}, /* Mn */
};
const size_t _wind_combining_table_size = 352;

View File

@ -1,18 +0,0 @@
/* combining_table.h */
/* Automatically generated at 2008-03-18T11:38:08.165877 */
#ifndef COMBINING_TABLE_H
#define COMBINING_TABLE_H 1
#include <stddef.h>
#include <stdint.h>
struct translation {
uint32_t key;
unsigned combining_class;
};
extern const struct translation _wind_combining_table[];
extern const size_t _wind_combining_table_size;
#endif /* COMBINING_TABLE_H */

View File

@ -1,88 +0,0 @@
/* errorlist_table.c */
/* Automatically generated at 2008-03-18T11:38:08.266475 */
#include "errorlist_table.h"
const struct error_entry _wind_errorlist_table[] = {
{0x0, 0x20, WIND_PROFILE_SASL}, /* C.2.1: [CONTROL CHARACTERS] */
{0x7f, 0x1, WIND_PROFILE_SASL}, /* C.2.1: DELETE */
{0x80, 0x20, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: [CONTROL CHARACTERS] */
{0xa0, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: NO-BREAK SPACE */
{0x340, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: COMBINING GRAVE TONE MARK */
{0x341, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: COMBINING ACUTE TONE MARK */
{0x6dd, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: ARABIC END OF AYAH */
{0x70f, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: SYRIAC ABBREVIATION MARK */
{0x1680, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: OGHAM SPACE MARK */
{0x180e, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: MONGOLIAN VOWEL SEPARATOR */
{0x2000, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: EN QUAD */
{0x2001, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: EM QUAD */
{0x2002, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: EN SPACE */
{0x2003, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: EM SPACE */
{0x2004, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: THREE-PER-EM SPACE */
{0x2005, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: FOUR-PER-EM SPACE */
{0x2006, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: SIX-PER-EM SPACE */
{0x2007, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: FIGURE SPACE */
{0x2008, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: PUNCTUATION SPACE */
{0x2009, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: THIN SPACE */
{0x200a, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: HAIR SPACE */
{0x200b, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: ZERO WIDTH SPACE */
{0x200c, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: ZERO WIDTH NON-JOINER */
{0x200d, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: ZERO WIDTH JOINER */
{0x200e, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: LEFT-TO-RIGHT MARK */
{0x200f, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: RIGHT-TO-LEFT MARK */
{0x2028, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: LINE SEPARATOR */
{0x2029, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: PARAGRAPH SEPARATOR */
{0x202a, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: LEFT-TO-RIGHT EMBEDDING */
{0x202b, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: RIGHT-TO-LEFT EMBEDDING */
{0x202c, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: POP DIRECTIONAL FORMATTING */
{0x202d, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: LEFT-TO-RIGHT OVERRIDE */
{0x202e, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: RIGHT-TO-LEFT OVERRIDE */
{0x202f, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: NARROW NO-BREAK SPACE */
{0x205f, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: MEDIUM MATHEMATICAL SPACE */
{0x2060, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: WORD JOINER */
{0x2061, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: FUNCTION APPLICATION */
{0x2062, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: INVISIBLE TIMES */
{0x2063, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: INVISIBLE SEPARATOR */
{0x206a, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL|WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.8,C.2.2: INHIBIT SYMMETRIC SWAPPING */
{0x206b, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: ACTIVATE SYMMETRIC SWAPPING */
{0x206c, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: INHIBIT ARABIC FORM SHAPING */
{0x206d, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: ACTIVATE ARABIC FORM SHAPING */
{0x206e, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: NATIONAL DIGIT SHAPES */
{0x206f, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.8: NOMINAL DIGIT SHAPES */
{0x2ff0, 0xc, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.7: [IDEOGRAPHIC DESCRIPTION CHARACTERS] */
{0x3000, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.1.2: IDEOGRAPHIC SPACE */
{0xd800, 0x800, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.5: [SURROGATE CODES] */
{0xe000, 0x1900, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.3: [PRIVATE USE, PLANE 0] */
{0xfdd0, 0x20, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xfeff, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: ZERO WIDTH NO-BREAK SPACE */
{0xfff9, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL|WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.6,C.2.2: INTERLINEAR ANNOTATION ANCHOR */
{0xfffa, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.6: INTERLINEAR ANNOTATION SEPARATOR */
{0xfffb, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.6: INTERLINEAR ANNOTATION TERMINATOR */
{0xfffc, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.6: OBJECT REPLACEMENT CHARACTER */
{0xfffd, 0x1, WIND_PROFILE_LDAP|WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* rfc4518-error,C.6: */
{0xfffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x1d173, 0x8, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.2.2: [MUSICAL CONTROL CHARACTERS] */
{0x1fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x2fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x3fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x4fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x5fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x6fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x7fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x8fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x9fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xafffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xbfffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xcfffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xdfffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xe0001, 0x1, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.9: LANGUAGE TAG */
{0xe0020, 0x60, WIND_PROFILE_NAME|WIND_PROFILE_SASL}, /* C.9: [TAGGING CHARACTERS] */
{0xefffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0xf0000, 0xfffe, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.3: [PRIVATE USE, PLANE 15] */
{0xffffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
{0x100000, 0xfffe, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.3: [PRIVATE USE, PLANE 16] */
{0x10fffe, 0x2, WIND_PROFILE_NAME|WIND_PROFILE_LDAP|WIND_PROFILE_SASL}, /* C.4: [NONCHARACTER CODE POINTS] */
};
const size_t _wind_errorlist_table_size = 78;

View File

@ -1,19 +0,0 @@
/* errorlist_table.h */
/* Automatically generated at 2008-03-18T11:38:08.266305 */
#ifndef ERRORLIST_TABLE_H
#define ERRORLIST_TABLE_H 1
#include "windlocl.h"
struct error_entry {
uint32_t start;
unsigned len;
wind_profile_flags flags;
};
extern const struct error_entry _wind_errorlist_table[];
extern const size_t _wind_errorlist_table_size;
#endif /* ERRORLIST_TABLE_H */

View File

@ -0,0 +1,101 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: gen-bidi.py 23332 2008-06-27 14:42:17Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
import sys
import generate
import rfc3454
if len(sys.argv) != 3:
print "usage: %s rfc3454.txt outdir" % sys.argv[0]
sys.exit(1)
tables = rfc3454.read(sys.argv[1])
bidi_h = generate.Header('%s/bidi_table.h' % sys.argv[2])
bidi_c = generate.Implementation('%s/bidi_table.c' % sys.argv[2])
bidi_h.file.write(
'''
#include <krb5-types.h>
struct range_entry {
uint32_t start;
unsigned len;
};
extern const struct range_entry _wind_ral_table[];
extern const struct range_entry _wind_l_table[];
extern const size_t _wind_ral_table_size;
extern const size_t _wind_l_table_size;
''')
bidi_c.file.write(
'''
#include "bidi_table.h"
''')
def printTable(file, table, variable):
"""print table to file named as variable"""
file.write("const struct range_entry %s[] = {\n" % variable)
count = 0
for l in tables[table]:
m = re.search('^ *([0-9A-F]+)-([0-9A-F]+) *$', l)
if m:
start = int(m.group(1), 0x10)
end = int(m.group(2), 0x10)
file.write(" {0x%x, 0x%x},\n" % (start, end - start + 1))
count += 1
else:
m = re.search('^ *([0-9A-F]+) *$', l)
if m:
v = int(m.group(1), 0x10)
file.write(" {0x%x, 1},\n" % v)
count += 1
file.write("};\n\n")
file.write("const size_t %s_size = %u;\n\n" % (variable, count))
printTable(bidi_c.file, 'D.1', '_wind_ral_table')
printTable(bidi_c.file, 'D.2', '_wind_l_table')
bidi_h.close()
bidi_c.close()

View File

@ -0,0 +1,104 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: gen-combining.py 23332 2008-06-27 14:42:17Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
import sys
import generate
import UnicodeData
if len(sys.argv) != 3:
print "usage: %s UnicodeData.txt out-dir" % sys.argv[0]
sys.exit(1)
ud = UnicodeData.read(sys.argv[1])
trans = {}
for k,v in ud.items():
if int(v[2]) != 0 :
trans[k] = [int(v[2]), v[1]]
# trans = [(x[0], int(x[3]), x[1]) for x in UnicodeData.read() if int(x[3]) != 0]
combining_h = generate.Header('%s/combining_table.h' % sys.argv[2])
combining_c = generate.Implementation('%s/combining_table.c' % sys.argv[2])
combining_h.file.write(
'''
#include <krb5-types.h>
struct translation {
uint32_t key;
unsigned combining_class;
};
extern const struct translation _wind_combining_table[];
extern const size_t _wind_combining_table_size;
''')
combining_c.file.write(
'''
#include "combining_table.h"
const struct translation _wind_combining_table[] = {
''')
s = trans.keys()
s.sort()
for k in s:
v = trans[k]
combining_c.file.write("{0x%x, %u}, /* %s */\n"
% (k, v[0], v[1]))
#trans.sort()
#for x in trans:
# combining_c.file.write("{0x%x, %u}, /* %s */\n"
# % (x[0], x[1], x[2]))
combining_c.file.write(
'''
};
''')
combining_c.file.write(
"const size_t _wind_combining_table_size = %u;\n" % len(trans))
combining_h.close()
combining_c.close()

View File

@ -0,0 +1,120 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: gen-errorlist.py 23242 2008-06-01 22:27:54Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
import sys
import generate
import rfc3454
import rfc4518
import stringprep
if len(sys.argv) != 3:
print "usage: %s rfc3454.txt out-dir" % sys.argv[0]
sys.exit(1)
tables = rfc3454.read(sys.argv[1])
t2 = rfc4518.read()
for x in t2.iterkeys():
tables[x] = t2[x]
error_list = stringprep.get_errorlist()
errorlist_h = generate.Header('%s/errorlist_table.h' % sys.argv[2])
errorlist_c = generate.Implementation('%s/errorlist_table.c' % sys.argv[2])
errorlist_h.file.write(
'''
#include "windlocl.h"
struct error_entry {
uint32_t start;
unsigned len;
wind_profile_flags flags;
};
extern const struct error_entry _wind_errorlist_table[];
extern const size_t _wind_errorlist_table_size;
''')
errorlist_c.file.write(
'''
#include "errorlist_table.h"
const struct error_entry _wind_errorlist_table[] = {
''')
trans=[]
for t in error_list.iterkeys():
for l in tables[t]:
m = re.search('^ *([0-9A-F]+)-([0-9A-F]+); *(.*) *$', l)
if m:
start = int(m.group(1), 0x10)
end = int(m.group(2), 0x10)
desc = m.group(3)
trans.append([start, end - start + 1, desc, [t]])
else:
m = re.search('^ *([0-9A-F]+); *(.*) *$', l)
if m:
trans.append([int(m.group(1), 0x10), 1, m.group(2), [t]])
trans = stringprep.sort_merge_trans(trans)
for x in trans:
(start, length, description, tables) = x
symbols = stringprep.symbols(error_list, tables)
if len(symbols) == 0:
print "no symbol for %s" % description
sys.exit(1)
errorlist_c.file.write(" {0x%x, 0x%x, %s}, /* %s: %s */\n"
% (start, length, symbols, ",".join(tables), description))
errorlist_c.file.write(
'''};
''')
errorlist_c.file.write(
"const size_t _wind_errorlist_table_size = %u;\n" % len(trans))
errorlist_h.close()
errorlist_c.close()

View File

@ -0,0 +1,158 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: gen-map.py 23242 2008-06-01 22:27:54Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
import sys
import generate
import rfc3454
import rfc4518
import stringprep
import util
if len(sys.argv) != 3:
print "usage: %s rfc3454.txt out-dir" % sys.argv[0]
sys.exit(1)
tables = rfc3454.read(sys.argv[1])
t2 = rfc4518.read()
for x in t2.iterkeys():
tables[x] = t2[x]
map_list = stringprep.get_maplist()
map_h = generate.Header('%s/map_table.h' % sys.argv[2])
map_c = generate.Implementation('%s/map_table.c' % sys.argv[2])
map_h.file.write(
'''
#include "windlocl.h"
struct translation {
uint32_t key;
unsigned short val_len;
unsigned short val_offset;
wind_profile_flags flags;
};
extern const struct translation _wind_map_table[];
extern const size_t _wind_map_table_size;
extern const uint32_t _wind_map_table_val[];
''')
map_c.file.write(
'''
#include "map_table.h"
const struct translation _wind_map_table[] = {
''')
trans=[]
for t in map_list.iterkeys():
for l in tables[t]:
m = re.search('^ *([0-9A-F]+)-([0-9A-F]+); *([^;]+); *(.*) *$', l)
if m:
start = int(m.group(1), 0x10)
end = int(m.group(2), 0x10)
value = m.group(3)
desc = m.group(4)
for key in xrange(start,end,1):
trans.append((key, value, desc, [t]))
continue
m = re.search('^ *([^;]+); *([^;]+); *(.*) *$', l)
if m:
key = int(m.group(1), 0x10)
value = m.group(2)
desc = m.group(3)
trans.append((key, value, desc, [t]))
continue
valTable = []
offsetTable = {}
trans = stringprep.sort_merge_trans(trans)
for x in trans:
if x[0] == 0xad:
print "fooresult %s" % ",".join(x[3])
for x in trans:
(key, value, description, table) = x
v = value.split()
i = util.subList(valTable, v)
if i:
offsetTable[key] = i
else:
offsetTable[key] = len(valTable)
valTable.extend(v)
for x in trans:
(key, value, description, tables) = x
symbols = stringprep.symbols(map_list, tables)
if len(symbols) == 0:
print "no symbol for %s %s (%s)" % (key, description, tables)
sys.exit(1)
v = value.split()
map_c.file.write(" {0x%x, %u, %u, %s}, /* %s: %s */\n"
% (key, len(v), offsetTable[key], symbols, ",".join(tables), description))
map_c.file.write(
'''
};
''')
map_c.file.write(
"const size_t _wind_map_table_size = %u;\n\n" % len(trans))
map_c.file.write(
"const uint32_t _wind_map_table_val[] = {\n")
for x in valTable:
map_c.file.write(" 0x%s,\n" % x)
map_c.file.write(
"};\n\n")
map_h.close()
map_c.close()

View File

@ -0,0 +1,210 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: gen-normalize.py 23332 2008-06-27 14:42:17Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
import sys
import generate
import UnicodeData
import util
if len(sys.argv) != 4:
print "usage: %s UnicodeData.txt"
" CompositionExclusions-3.2.0.txt out-dir" % sys.argv[0]
sys.exit(1)
ud = UnicodeData.read(sys.argv[1])
def sortedKeys(d):
"""Return a sorted list of the keys of a dict"""
keys = d.keys()
keys.sort()
return keys
trans = dict([(k, [re.sub('<[a-zA-Z]+>', '', v[4]), v[0]])
for k,v in ud.items() if v[4]])
maxLength = 0
for v in trans.values():
maxLength = max(maxLength, len(v[0].split()))
normalize_h = generate.Header('%s/normalize_table.h' % sys.argv[3])
normalize_c = generate.Implementation('%s/normalize_table.c' % sys.argv[3])
normalize_h.file.write(
'''
#include <krb5-types.h>
#define MAX_LENGTH_CANON %u
struct translation {
uint32_t key;
unsigned short val_len;
unsigned short val_offset;
};
extern const struct translation _wind_normalize_table[];
extern const uint32_t _wind_normalize_val_table[];
extern const size_t _wind_normalize_table_size;
struct canon_node {
uint32_t val;
unsigned char next_start;
unsigned char next_end;
unsigned short next_offset;
};
extern const struct canon_node _wind_canon_table[];
extern const unsigned short _wind_canon_next_table[];
''' % maxLength)
normalize_c.file.write(
'''
#include "normalize_table.h"
const struct translation _wind_normalize_table[] = {
''')
normalizeValTable = []
for k in sortedKeys(trans) :
v = trans[k]
(key, value, description) = k, v[0], v[1]
vec = [int(x, 0x10) for x in value.split()];
offset = util.subList(normalizeValTable, vec)
if not offset:
offset = len(normalizeValTable)
normalizeValTable.extend(vec) # [("0x%s" % i) for i in vec])
normalize_c.file.write(" {0x%x, %u, %u}, /* %s */\n"
% (key, len(vec), offset, description))
normalize_c.file.write(
'''};
''')
normalize_c.file.write(
"const size_t _wind_normalize_table_size = %u;\n\n" % len(trans))
normalize_c.file.write("const uint32_t _wind_normalize_val_table[] = {\n")
for v in normalizeValTable:
normalize_c.file.write(" 0x%x,\n" % v)
normalize_c.file.write("};\n\n");
exclusions = UnicodeData.read(sys.argv[2])
inv = dict([(''.join(["%05x" % int(x, 0x10) for x in v[4].split(' ')]),
[k, v[0]])
for k,v in ud.items()
if v[4] and not re.search('<[a-zA-Z]+> *', v[4]) and not exclusions.has_key(k)])
table = 0
tables = {}
def createTable():
"""add a new table"""
global table, tables
ret = table
table += 1
tables[ret] = [0] + [None] * 16
return ret
def add(table, k, v):
"""add an entry (k, v) to table (recursively)"""
if len(k) == 0:
table[0] = v[0]
else:
i = int(k[0], 0x10) + 1
if table[i] == None:
table[i] = createTable()
add(tables[table[i]], k[1:], v)
top = createTable()
for k,v in inv.items():
add(tables[top], k, v)
next_table = []
tableToNext = {}
tableEnd = {}
tableStart = {}
for k in sortedKeys(tables) :
t = tables[k]
tableToNext[k] = len(next_table)
l = t[1:]
start = 0
while start < 16 and l[start] == None:
start += 1
end = 16
while end > start and l[end - 1] == None:
end -= 1
tableStart[k] = start
tableEnd[k] = end
n = []
for i in range(start, end):
x = l[i]
if x:
n.append(x)
else:
n.append(0)
next_table.extend(n)
normalize_c.file.write("const struct canon_node _wind_canon_table[] = {\n")
for k in sortedKeys(tables) :
t = tables[k]
normalize_c.file.write(" {0x%x, %u, %u, %u},\n" %
(t[0], tableStart[k], tableEnd[k], tableToNext[k]))
normalize_c.file.write("};\n\n")
normalize_c.file.write("const unsigned short _wind_canon_next_table[] = {\n")
for k in next_table:
normalize_c.file.write(" %u,\n" % k)
normalize_c.file.write("};\n\n")
normalize_h.close()
normalize_c.close()

View File

@ -0,0 +1,81 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: generate.py 23242 2008-06-01 22:27:54Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import datetime
import string
import os
class GeneratedFile :
"Represents a generated file"
def __init__(self, name) :
"Create a new GeneratedFile with name"
self.name = os.path.basename(name)
self.file = open(name, 'w')
self.file.write('/* ' + name + ' */\n')
self.file.write('/* Automatically generated at ' +
datetime.datetime.now().isoformat() +
' */\n\n')
def close(self) :
"""End and close the file header"""
self.file.close()
class Header(GeneratedFile) :
"Represents a generated header file"
guardTrans = string.maketrans('-.', '__')
def makeGuard(self) :
"""Return a name to be used as ifdef guard"""
return string.upper(string.translate(self.name, self.guardTrans))
def __init__(self, name) :
"Create a new Header with name"
GeneratedFile.__init__(self, name)
self.guard = self.makeGuard()
self.file.write('#ifndef ' + self.guard + '\n')
self.file.write('#define ' + self.guard + ' 1\n')
def close(self) :
"""End and close the file header"""
self.file.write('#endif /* ' + self.guard + ' */\n')
GeneratedFile.close(self)
class Implementation(GeneratedFile) :
"Represents a generated implementation file"
def __init__(self, name) :
"Create a new Implementation with name"
GeneratedFile.__init__(self, name)

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
/* map_table.h */
/* Automatically generated at 2008-03-18T11:38:08.353625 */
#ifndef MAP_TABLE_H
#define MAP_TABLE_H 1
#include "windlocl.h"
struct translation {
uint32_t key;
unsigned short val_len;
unsigned short val_offset;
wind_profile_flags flags;
};
extern const struct translation _wind_map_table[];
extern const size_t _wind_map_table_size;
extern const uint32_t _wind_map_table_val[];
#endif /* MAP_TABLE_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
/* normalize_table.h */
/* Automatically generated at 2008-03-18T11:38:08.923674 */
#ifndef NORMALIZE_TABLE_H
#define NORMALIZE_TABLE_H 1
#include <stddef.h>
#include <stdint.h>
#define MAX_LENGTH_CANON 18
struct translation {
uint32_t key;
unsigned short val_len;
unsigned short val_offset;
};
extern const struct translation _wind_normalize_table[];
extern const uint32_t _wind_normalize_val_table[];
extern const size_t _wind_normalize_table_size;
struct canon_node {
uint32_t val;
unsigned char next_start;
unsigned char next_end;
unsigned short next_offset;
};
extern const struct canon_node _wind_canon_table[];
extern const unsigned short _wind_canon_next_table[];
#endif /* NORMALIZE_TABLE_H */

View File

@ -0,0 +1,60 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: rfc3454.py 22551 2008-02-01 16:22:22Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
def read(filename):
"""return a dict of tables from rfc3454"""
f = open(filename, 'r')
inTable = False
ret = {}
while True:
l = f.readline()
if not l:
break
if inTable:
m = re.search('^ *----- End Table ([A-Z0-9\.]+) ----- *$', l)
if m:
ret[m.group(1)] = t
inTable = False
else:
t.append(l)
if re.search('^ *----- Start Table ([A-Z0-9\.]+) ----- *$', l):
inTable = True
t = []
f.close()
return ret

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,395 @@
Network Working Group P. Hoffman
Request for Comments: 3491 IMC & VPNC
Category: Standards Track M. Blanchet
Viagenie
March 2003
Nameprep: A Stringprep Profile for
Internationalized Domain Names (IDN)
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract
This document describes how to prepare internationalized domain name
(IDN) labels in order to increase the likelihood that name input and
name comparison work in ways that make sense for typical users
throughout the world. This profile of the stringprep protocol is
used as part of a suite of on-the-wire protocols for
internationalizing the Domain Name System (DNS).
1. Introduction
This document specifies processing rules that will allow users to
enter internationalized domain names (IDNs) into applications and
have the highest chance of getting the content of the strings
correct. It is a profile of stringprep [STRINGPREP]. These
processing rules are only intended for internationalized domain
names, not for arbitrary text.
This profile defines the following, as required by [STRINGPREP].
- The intended applicability of the profile: internationalized
domain names processed by IDNA.
- The character repertoire that is the input and output to
stringprep: Unicode 3.2, specified in section 2.
Hoffman & Blanchet Standards Track [Page 1]
RFC 3491 IDN Nameprep March 2003
- The mappings used: specified in section 3.
- The Unicode normalization used: specified in section 4.
- The characters that are prohibited as output: specified in section
5.
- Bidirectional character handling: specified in section 6.
1.1 Interaction of protocol parts
Nameprep is used by the IDNA [IDNA] protocol for preparing domain
names; it is not designed for any other purpose. It is explicitly
not designed for processing arbitrary free text and SHOULD NOT be
used for that purpose. Nameprep is a profile of Stringprep
[STRINGPREP]. Implementations of Nameprep MUST fully implement
Stringprep.
Nameprep is used to process domain name labels, not domain names.
IDNA calls nameprep for each label in a domain name, not for the
whole domain name.
1.2 Terminology
The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
in this document are to be interpreted as described in BCP 14, RFC
2119 [RFC2119].
2. Character Repertoire
This profile uses Unicode 3.2, as defined in [STRINGPREP] Appendix A.
3. Mapping
This profile specifies mapping using the following tables from
[STRINGPREP]:
Table B.1
Table B.2
4. Normalization
This profile specifies using Unicode normalization form KC, as
described in [STRINGPREP].
Hoffman & Blanchet Standards Track [Page 2]
RFC 3491 IDN Nameprep March 2003
5. Prohibited Output
This profile specifies prohibiting using the following tables from
[STRINGPREP]:
Table C.1.2
Table C.2.2
Table C.3
Table C.4
Table C.5
Table C.6
Table C.7
Table C.8
Table C.9
IMPORTANT NOTE: This profile MUST be used with the IDNA protocol.
The IDNA protocol has additional prohibitions that are checked
outside of this profile.
6. Bidirectional characters
This profile specifies checking bidirectional strings as described in
[STRINGPREP] section 6.
7. Unassigned Code Points in Internationalized Domain Names
If the processing in [IDNA] specifies that a list of unassigned code
points be used, the system uses table A.1 from [STRINGPREP] as its
list of unassigned code points.
8. References
8.1 Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[STRINGPREP] Hoffman, P. and M. Blanchet, "Preparation of
Internationalized Strings ("stringprep")", RFC 3454,
December 2002.
[IDNA] Faltstrom, P., Hoffman, P. and A. Costello,
"Internationalizing Domain Names in Applications
(IDNA)", RFC 3490, March 2003.
Hoffman & Blanchet Standards Track [Page 3]
RFC 3491 IDN Nameprep March 2003
8.2 Informative references
[STD13] Mockapetris, P., "Domain names - concepts and
facilities", STD 13, RFC 1034, and "Domain names -
implementation and specification", STD 13, RFC 1035,
November 1987.
9. Security Considerations
The Unicode and ISO/IEC 10646 repertoires have many characters that
look similar. In many cases, users of security protocols might do
visual matching, such as when comparing the names of trusted third
parties. Because it is impossible to map similar-looking characters
without a great deal of context such as knowing the fonts used,
stringprep does nothing to map similar-looking characters together
nor to prohibit some characters because they look like others.
Security on the Internet partly relies on the DNS. Thus, any change
to the characteristics of the DNS can change the security of much of
the Internet.
Domain names are used by users to connect to Internet servers. The
security of the Internet would be compromised if a user entering a
single internationalized name could be connected to different servers
based on different interpretations of the internationalized domain
name.
Current applications might assume that the characters allowed in
domain names will always be the same as they are in [STD13]. This
document vastly increases the number of characters available in
domain names. Every program that uses "special" characters in
conjunction with domain names may be vulnerable to attack based on
the new characters allowed by this specification.
Hoffman & Blanchet Standards Track [Page 4]
RFC 3491 IDN Nameprep March 2003
10. IANA Considerations
This is a profile of stringprep. It has been registered by the IANA
in the stringprep profile registry
(www.iana.org/assignments/stringprep-profiles).
Name of this profile:
Nameprep
RFC in which the profile is defined:
This document.
Indicator whether or not this is the newest version of the
profile:
This is the first version of Nameprep.
11. Acknowledgements
Many people from the IETF IDN Working Group and the Unicode Technical
Committee contributed ideas that went into this document.
The IDN Nameprep design team made many useful changes to the
document. That team and its advisors include:
Asmus Freytag
Cathy Wissink
Francois Yergeau
James Seng
Marc Blanchet
Mark Davis
Martin Duerst
Patrik Faltstrom
Paul Hoffman
Additional significant improvements were proposed by:
Jonathan Rosenne
Kent Karlsson
Scott Hollenbeck
Dave Crocker
Erik Nordmark
Matitiahu Allouche
Hoffman & Blanchet Standards Track [Page 5]
RFC 3491 IDN Nameprep March 2003
12. Authors' Addresses
Paul Hoffman
Internet Mail Consortium and VPN Consortium
127 Segre Place
Santa Cruz, CA 95060 USA
EMail: paul.hoffman@imc.org and paul.hoffman@vpnc.org
Marc Blanchet
Viagenie inc.
2875 boul. Laurier, bur. 300
Ste-Foy, Quebec, Canada, G1V 2M2
EMail: Marc.Blanchet@viagenie.qc.ca
Hoffman & Blanchet Standards Track [Page 6]
RFC 3491 IDN Nameprep March 2003
13. Full Copyright Statement
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Hoffman & Blanchet Standards Track [Page 7]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,339 @@
Network Working Group K. Zeilenga
Request for Comments: 4013 OpenLDAP Foundation
Category: Standards Track February 2005
SASLprep: Stringprep Profile for User Names and Passwords
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2005).
Abstract
This document describes how to prepare Unicode strings representing
user names and passwords for comparison. The document defines the
"SASLprep" profile of the "stringprep" algorithm to be used for both
user names and passwords. This profile is intended to be used by
Simple Authentication and Security Layer (SASL) mechanisms (such as
PLAIN, CRAM-MD5, and DIGEST-MD5), as well as other protocols
exchanging simple user names and/or passwords.
1. Introduction
The use of simple user names and passwords in authentication and
authorization is pervasive on the Internet. To increase the
likelihood that user name and password input and comparison work in
ways that make sense for typical users throughout the world, this
document defines rules for preparing internationalized user names and
passwords for comparison. For simplicity and implementation ease, a
single algorithm is defined for both user names and passwords.
The algorithm assumes all strings are comprised of characters from
the Unicode [Unicode] character set.
This document defines the "SASLprep" profile of the "stringprep"
algorithm [StringPrep].
The profile is designed for use in Simple Authentication and Security
Layer ([SASL]) mechanisms, such as [PLAIN], [CRAM-MD5], and
[DIGEST-MD5]. It may be applicable where simple user names and
Zeilenga Standards Track [Page 1]
RFC 4013 SASLprep February 2005
passwords are used. This profile is not intended for use in
preparing identity strings that are not simple user names (e.g.,
email addresses, domain names, distinguished names), or where
identity or password strings that are not character data, or require
different handling (e.g., case folding).
This document does not alter the technical specification of any
existing protocols. Any specification that wishes to use the
algorithm described in this document needs to explicitly incorporate
this document and provide precise details as to where and how this
algorithm is used by implementations of that specification.
2. The SASLprep Profile
This section defines the "SASLprep" profile of the "stringprep"
algorithm [StringPrep]. This profile is intended for use in
preparing strings representing simple user names and passwords.
This profile uses Unicode 3.2 [Unicode].
Character names in this document use the notation for code points and
names from the Unicode Standard [Unicode]. For example, the letter
"a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
In the lists of mappings and the prohibited characters, the "U+" is
left off to make the lists easier to read. The comments for
character ranges are shown in square brackets (such as "[CONTROL
CHARACTERS]") and do not come from the standard.
Note: A glossary of terms used in Unicode can be found in [Glossary].
Information on the Unicode character encoding model can be found in
[CharModel].
2.1. Mapping
This profile specifies:
- non-ASCII space characters [StringPrep, C.1.2] that can be
mapped to SPACE (U+0020), and
- the "commonly mapped to nothing" characters [StringPrep, B.1]
that can be mapped to nothing.
2.2. Normalization
This profile specifies using Unicode normalization form KC, as
described in Section 4 of [StringPrep].
Zeilenga Standards Track [Page 2]
RFC 4013 SASLprep February 2005
2.3. Prohibited Output
This profile specifies the following characters as prohibited input:
- Non-ASCII space characters [StringPrep, C.1.2]
- ASCII control characters [StringPrep, C.2.1]
- Non-ASCII control characters [StringPrep, C.2.2]
- Private Use characters [StringPrep, C.3]
- Non-character code points [StringPrep, C.4]
- Surrogate code points [StringPrep, C.5]
- Inappropriate for plain text characters [StringPrep, C.6]
- Inappropriate for canonical representation characters
[StringPrep, C.7]
- Change display properties or deprecated characters
[StringPrep, C.8]
- Tagging characters [StringPrep, C.9]
2.4. Bidirectional Characters
This profile specifies checking bidirectional strings as described in
[StringPrep, Section 6].
2.5. Unassigned Code Points
This profile specifies the [StringPrep, A.1] table as its list of
unassigned code points.
3. Examples
The following table provides examples of how various character data
is transformed by the SASLprep string preparation algorithm
# Input Output Comments
- ----- ------ --------
1 I<U+00AD>X IX SOFT HYPHEN mapped to nothing
2 user user no transformation
3 USER USER case preserved, will not match #2
4 <U+00AA> a output is NFKC, input in ISO 8859-1
5 <U+2168> IX output is NFKC, will match #1
6 <U+0007> Error - prohibited character
7 <U+0627><U+0031> Error - bidirectional check
4. Security Considerations
This profile is intended to prepare simple user name and password
strings for comparison or use in cryptographic functions (e.g.,
message digests). The preparation algorithm was specifically
designed such that its output is canonical, and it is well-formed.
Zeilenga Standards Track [Page 3]
RFC 4013 SASLprep February 2005
However, due to an anomaly [PR29] in the specification of Unicode
normalization, canonical equivalence is not guaranteed for a select
few character sequences. These sequences, however, do not appear in
well-formed text. This specification was published despite this
known technical problem. It is expected that this specification will
be revised before further progression on the Standards Track (after
[Unicode] and/or [StringPrep] specifications have been updated to
address this problem).
It is not intended for preparing identity strings that are not simple
user names (e.g., distinguished names, domain names), nor is the
profile intended for use of simple user names that require different
handling (such as case folding). Protocols (or applications of those
protocols) that have application-specific identity forms and/or
comparison algorithms should use mechanisms specifically designed for
these forms and algorithms.
Application of string preparation may have an impact upon the
feasibility of brute force and dictionary attacks. While the number
of possible prepared strings is less than the number of possible
Unicode strings, the number of usable names and passwords is greater
than as if only ASCII was used. Though SASLprep eliminates some
Unicode code point sequences as possible prepared strings, that
elimination generally makes the (canonical) output forms practicable
and prohibits nonsensical inputs.
User names and passwords should be protected from eavesdropping.
General "stringprep" and Unicode security considerations apply. Both
are discussed in [StringPrep].
5. IANA Considerations
This document details the "SASLprep" profile of the [StringPrep]
protocol. This profile has been registered in the stringprep profile
registry.
Name of this profile: SASLprep
RFC in which the profile is defined: RFC 4013
Indicator whether or not this is the newest version of the
profile: This is the first version of the SASPprep profile.
6. Acknowledgement
This document borrows text from "Preparation of Internationalized
Strings ('stringprep')" and "Nameprep: A Stringprep Profile for
Internationalized Domain Names", both by Paul Hoffman and Marc
Blanchet. This document is a product of the IETF SASL WG.
Zeilenga Standards Track [Page 4]
RFC 4013 SASLprep February 2005
7. Normative References
[StringPrep] Hoffman, P. and M. Blanchet, "Preparation of
Internationalized Strings ("stringprep")", RFC 3454,
December 2002.
[Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version
3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-
61633-5), as amended by the "Unicode Standard Annex
#27: Unicode 3.1"
(http://www.unicode.org/reports/tr27/) and by the
"Unicode Standard Annex #28: Unicode 3.2"
(http://www.unicode.org/reports/tr28/).
8. Informative References
[Glossary] The Unicode Consortium, "Unicode Glossary",
<http://www.unicode.org/glossary/>.
[CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
#17, Character Encoding Model", UTR17,
<http://www.unicode.org/unicode/reports/tr17/>, August
2000.
[SASL] Melnikov, A., Ed., "Simple Authentication and Security
Layer (SASL)", Work in Progress.
[CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", Work in
Progress.
[DIGEST-MD5] Leach, P., Newman, C., and A. Melnikov, "Using Digest
Authentication as a SASL Mechanism", Work in Progress.
[PLAIN] Zeilenga, K., Ed., "The Plain SASL Mechanism", Work in
Progress.
[PR29] "Public Review Issue #29: Normalization Issue",
<http://www.unicode.org/review/pr-29.html>, February
2004.
Author's Address
Kurt D. Zeilenga
OpenLDAP Foundation
EMail: Kurt@OpenLDAP.org
Zeilenga Standards Track [Page 5]
RFC 4013 SASLprep February 2005
Full Copyright Statement
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the IETF's procedures with respect to rights in IETF Documents can
be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Zeilenga Standards Track [Page 6]

View File

@ -0,0 +1,150 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: rfc4518.py 22551 2008-02-01 16:22:22Z lha $
# Copyright (c) 2004, 2008 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
def read():
"""return a dict of tables from rfc4518"""
ret = {}
#2.2. Map
#
# SOFT HYPHEN (U+00AD) and MONGOLIAN TODO SOFT HYPHEN (U+1806) code
# points are mapped to nothing. COMBINING GRAPHEME JOINER (U+034F) and
# VARIATION SELECTORs (U+180B-180D, FF00-FE0F) code points are also
# mapped to nothing. The OBJECT REPLACEMENT CHARACTER (U+FFFC) is
# mapped to nothing.
t = []
t.append(" 00AD; ; Map to nothing")
t.append(" 1806; ; Map to nothing")
t.append(" 034F; ; Map to nothing")
t.append(" 180B; ; Map to nothing")
t.append(" 180C; ; Map to nothing")
t.append(" 180D; ; Map to nothing")
t.append(" FE00; ; Map to nothing")
t.append(" FE01; ; Map to nothing")
t.append(" FE02; ; Map to nothing")
t.append(" FE03; ; Map to nothing")
t.append(" FE04; ; Map to nothing")
t.append(" FE05; ; Map to nothing")
t.append(" FE06; ; Map to nothing")
t.append(" FE07; ; Map to nothing")
t.append(" FE08; ; Map to nothing")
t.append(" FE09; ; Map to nothing")
t.append(" FE0A; ; Map to nothing")
t.append(" FE0B; ; Map to nothing")
t.append(" FE0C; ; Map to nothing")
t.append(" FE0D; ; Map to nothing")
t.append(" FE0E; ; Map to nothing")
t.append(" FE0F; ; Map to nothing")
t.append(" FFFC; ; Map to nothing")
# CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
# TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
# (U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
t.append(" 0009; 0020 ; Map to SPACE")
t.append(" 000A; 0020 ; Map to SPACE")
t.append(" 000B; 0020 ; Map to SPACE")
t.append(" 000C; 0020 ; Map to SPACE")
t.append(" 000D; 0020 ; Map to SPACE")
t.append(" 0085; 0020 ; Map to SPACE")
# All other control code (e.g., Cc) points or code points with a
# control function (e.g., Cf) are mapped to nothing. The following is
# a complete list of these code points: U+0000-0008, 000E-001F, 007F-
# 0084, 0086-009F, 06DD, 070F, 180E, 200C-200F, 202A-202E, 2060-2063,
# 206A-206F, FEFF, FFF9-FFFB, 1D173-1D17A, E0001, E0020-E007F.
t.append(" 0000-0008; ; Map to nothing")
t.append(" 000E-001F; ; Map to nothing")
t.append(" 007F-0084; ; Map to nothing")
t.append(" 0086-009F; ; Map to nothing")
t.append(" 06DD; ; Map to nothing")
t.append(" 070F; ; Map to nothing")
t.append(" 180E; ; Map to nothing")
t.append(" 200C-200F; ; Map to nothing")
t.append(" 202A-202E; ; Map to nothing")
t.append(" 2060-2063; ; Map to nothing")
t.append(" 206A-206F; ; Map to nothing")
t.append(" FEFF; ; Map to nothing")
t.append(" FFF9-FFFB; ; Map to nothing")
t.append(" 1D173-1D17A; ; Map to nothing")
t.append(" E0001; ; Map to nothing")
t.append(" E0020-E007F; ; Map to nothing")
# ZERO WIDTH SPACE (U+200B) is mapped to nothing. All other code
# points with Separator (space, line, or paragraph) property (e.g., Zs,
# Zl, or Zp) are mapped to SPACE (U+0020). The following is a complete
# list of these code points: U+0020, 00A0, 1680, 2000-200A, 2028-2029,
# 202F, 205F, 3000.
t.append(" 200B; ; Map to nothing")
t.append(" 0020; 0020; Map to SPACE")
t.append(" 00A0; 0020; Map to SPACE")
t.append(" 1680; 0020; Map to SPACE")
t.append(" 2000-200A; 0020; Map to SPACE")
t.append(" 2028-2029; 0020; Map to SPACE")
t.append(" 202F; 0020; Map to SPACE")
t.append(" 205F; 0020; Map to SPACE")
t.append(" 3000; 0020; Map to SPACE")
ret["rfc4518-map"] = t
# For case ignore, numeric, and stored prefix string matching rules,
# characters are case folded per B.2 of [RFC3454].
t = []
#2.4. Prohibit
# The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited.
t.append(" FFFD;")
ret["rfc4518-error"] = t
t = []
return ret

View File

@ -0,0 +1,787 @@
Network Working Group K. Zeilenga
Request for Comments: 4518 OpenLDAP Foundation
Category: Standards Track June 2006
Lightweight Directory Access Protocol (LDAP):
Internationalized String Preparation
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
The previous Lightweight Directory Access Protocol (LDAP) technical
specifications did not precisely define how character string matching
is to be performed. This led to a number of usability and
interoperability problems. This document defines string preparation
algorithms for character-based matching rules defined for use in
LDAP.
1. Introduction
1.1. Background
A Lightweight Directory Access Protocol (LDAP) [RFC4510] matching
rule [RFC4517] defines an algorithm for determining whether a
presented value matches an attribute value in accordance with the
criteria defined for the rule. The proposition may be evaluated to
True, False, or Undefined.
True - the attribute contains a matching value,
False - the attribute contains no matching value,
Undefined - it cannot be determined whether the attribute contains
a matching value.
Zeilenga Standards Track [Page 1]
RFC 4518 LDAP: Internationalized String Preparation June 2006
For instance, the caseIgnoreMatch matching rule may be used to
compare whether the commonName attribute contains a particular value
without regard for case and insignificant spaces.
1.2. X.500 String Matching Rules
"X.520: Selected attribute types" [X.520] provides (among other
things) value syntaxes and matching rules for comparing values
commonly used in the directory [X.500]. These specifications are
inadequate for strings composed of Unicode [Unicode] characters.
The caseIgnoreMatch matching rule [X.520], for example, is simply
defined as being a case-insensitive comparison where insignificant
spaces are ignored. For printableString, there is only one space
character and case mapping is bijective, hence this definition is
sufficient. However, for Unicode string types such as
universalString, this is not sufficient. For example, a case-
insensitive matching implementation that folded lowercase characters
to uppercase would yield different results than an implementation
that used uppercase to lowercase folding. Or one implementation may
view space as referring to only SPACE (U+0020), a second
implementation may view any character with the space separator (Zs)
property as a space, and another implementation may view any
character with the whitespace (WS) category as a space.
The lack of precise specification for character string matching has
led to significant interoperability problems. When used in
certificate chain validation, security vulnerabilities can arise. To
address these problems, this document defines precise algorithms for
preparing character strings for matching.
1.3. Relationship to "stringprep"
The character string preparation algorithms described in this
document are based upon the "stringprep" approach [RFC3454]. In
"stringprep", presented and stored values are first prepared for
comparison so that a character-by-character comparison yields the
"correct" result.
The approach used here is a refinement of the "stringprep" [RFC3454]
approach. Each algorithm involves two additional preparation steps.
a) Prior to applying the Unicode string preparation steps outlined in
"stringprep", the string is transcoded to Unicode.
b) After applying the Unicode string preparation steps outlined in
"stringprep", the string is modified to appropriately handle
characters insignificant to the matching rule.
Zeilenga Standards Track [Page 2]
RFC 4518 LDAP: Internationalized String Preparation June 2006
Hence, preparation of character strings for X.500 [X.500] matching
[X.501] involves the following steps:
1) Transcode
2) Map
3) Normalize
4) Prohibit
5) Check Bidi (Bidirectional)
6) Insignificant Character Handling
These steps are described in Section 2.
It is noted that while various tables of Unicode characters included
or referenced by this specification are derived from Unicode
[Unicode] data, these tables are to be considered definitive for the
purpose of implementing this specification.
1.4. Relationship to the LDAP Technical Specification
This document is an integral part of the LDAP technical specification
[RFC4510], which obsoletes the previously defined LDAP technical
specification [RFC3377] in its entirety.
This document details new LDAP internationalized character string
preparation algorithms used by [RFC4517] and possible other technical
specifications defining LDAP syntaxes and/or matching rules.
1.5. Relationship to X.500
LDAP is defined [RFC4510] in X.500 terms as an X.500 access
mechanism. As such, there is a strong desire for alignment between
LDAP and X.500 syntax and semantics. The character string
preparation algorithms described in this document are based upon
"Internationalized String Matching Rules for X.500" [XMATCH] proposal
to ITU/ISO Joint Study Group 2.
1.6. Conventions and Terms
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 [RFC2119].
Character names in this document use the notation for code points and
names from the Unicode Standard [Unicode]. For example, the letter
"a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
In the lists of mappings and the prohibited characters, the "U+" is
Zeilenga Standards Track [Page 3]
RFC 4518 LDAP: Internationalized String Preparation June 2006
left off to make the lists easier to read. The comments for
character ranges are shown in square brackets (such as "[CONTROL
CHARACTERS]") and do not come from the standard.
Note: a glossary of terms used in Unicode can be found in [Glossary].
Information on the Unicode character encoding model can be found in
[CharModel].
The term "combining mark", as used in this specification, refers to
any Unicode [Unicode] code point that has a mark property (Mn, Mc,
Me). Appendix A provides a definitive list of combining marks.
2. String Preparation
The following six-step process SHALL be applied to each presented and
attribute value in preparation for character string matching rule
evaluation.
1) Transcode
2) Map
3) Normalize
4) Prohibit
5) Check bidi
6) Insignificant Character Handling
Failure in any step causes the assertion to evaluate to Undefined.
The character repertoire of this process is Unicode 3.2 [Unicode].
Note that this six-step process specification is intended to describe
expected matching behavior. Implementations are free to use
alternative processes so long as the matching rule evaluation
behavior provided is consistent with the behavior described by this
specification.
2.1. Transcode
Each non-Unicode string value is transcoded to Unicode.
PrintableString [X.680] values are transcoded directly to Unicode.
UniversalString, UTF8String, and bmpString [X.680] values need not be
transcoded as they are Unicode-based strings (in the case of
bmpString, a subset of Unicode).
TeletexString [X.680] values are transcoded to Unicode. As there is
no standard for mapping TeletexString values to Unicode, the mapping
is left a local matter.
Zeilenga Standards Track [Page 4]
RFC 4518 LDAP: Internationalized String Preparation June 2006
For these and other reasons, use of TeletexString is NOT RECOMMENDED.
The output is the transcoded string.
2.2. Map
SOFT HYPHEN (U+00AD) and MONGOLIAN TODO SOFT HYPHEN (U+1806) code
points are mapped to nothing. COMBINING GRAPHEME JOINER (U+034F) and
VARIATION SELECTORs (U+180B-180D, FF00-FE0F) code points are also
mapped to nothing. The OBJECT REPLACEMENT CHARACTER (U+FFFC) is
mapped to nothing.
CHARACTER TABULATION (U+0009), LINE FEED (LF) (U+000A), LINE
TABULATION (U+000B), FORM FEED (FF) (U+000C), CARRIAGE RETURN (CR)
(U+000D), and NEXT LINE (NEL) (U+0085) are mapped to SPACE (U+0020).
All other control code (e.g., Cc) points or code points with a
control function (e.g., Cf) are mapped to nothing. The following is
a complete list of these code points: U+0000-0008, 000E-001F, 007F-
0084, 0086-009F, 06DD, 070F, 180E, 200C-200F, 202A-202E, 2060-2063,
206A-206F, FEFF, FFF9-FFFB, 1D173-1D17A, E0001, E0020-E007F.
ZERO WIDTH SPACE (U+200B) is mapped to nothing. All other code
points with Separator (space, line, or paragraph) property (e.g., Zs,
Zl, or Zp) are mapped to SPACE (U+0020). The following is a complete
list of these code points: U+0020, 00A0, 1680, 2000-200A, 2028-2029,
202F, 205F, 3000.
For case ignore, numeric, and stored prefix string matching rules,
characters are case folded per B.2 of [RFC3454].
The output is the mapped string.
2.3. Normalize
The input string is to be normalized to Unicode Form KC
(compatibility composed) as described in [UAX15]. The output is the
normalized string.
2.4. Prohibit
All Unassigned code points are prohibited. Unassigned code points
are listed in Table A.1 of [RFC3454].
Characters that, per Section 5.8 of [RFC3454], change display
properties or are deprecated are prohibited. These characters are
listed in Table C.8 of [RFC3454].
Zeilenga Standards Track [Page 5]
RFC 4518 LDAP: Internationalized String Preparation June 2006
Private Use code points are prohibited. These characters are listed
in Table C.3 of [RFC3454].
All non-character code points are prohibited. These code points are
listed in Table C.4 of [RFC3454].
Surrogate codes are prohibited. These characters are listed in Table
C.5 of [RFC3454].
The REPLACEMENT CHARACTER (U+FFFD) code point is prohibited.
The step fails if the input string contains any prohibited code
point. Otherwise, the output is the input string.
2.5. Check bidi
Bidirectional characters are ignored.
2.6. Insignificant Character Handling
In this step, the string is modified to ensure proper handling of
characters insignificant to the matching rule. This modification
differs from matching rule to matching rule.
Section 2.6.1 applies to case ignore and exact string matching.
Section 2.6.2 applies to numericString matching.
Section 2.6.3 applies to telephoneNumber matching.
2.6.1. Insignificant Space Handling
For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks.
NOTE - The previous steps ensure that the string cannot contain
any code points in the separator class, other than SPACE
(U+0020).
For input strings that are attribute values or non-substring
assertion values: If the input string contains no non-space
character, then the output is exactly two SPACEs. Otherwise (the
input string contains at least one non-space character), the string
is modified such that the string starts with exactly one space
character, ends with exactly one SPACE character, and any inner
(non-empty) sequence of space characters is replaced with exactly two
SPACE characters. For instance, the input strings
"foo<SPACE>bar<SPACE><SPACE>", result in the output
"<SPACE>foo<SPACE><SPACE>bar<SPACE>".
Zeilenga Standards Track [Page 6]
RFC 4518 LDAP: Internationalized String Preparation June 2006
For input strings that are substring assertion values: If the string
being prepared contains no non-space characters, then the output
string is exactly one SPACE. Otherwise, the following steps are
taken:
- If the input string is an initial substring, it is modified to
start with exactly one SPACE character;
- If the input string is an initial or an any substring that ends in
one or more space characters, it is modified to end with exactly
one SPACE character;
- If the input string is an any or a final substring that starts in
one or more space characters, it is modified to start with exactly
one SPACE character; and
- If the input string is a final substring, it is modified to end
with exactly one SPACE character.
For instance, for the input string "foo<SPACE>bar<SPACE><SPACE>" as
an initial substring, the output would be
"<SPACE>foo<SPACE><SPACE>bar<SPACE>". As an any or final substring,
the same input would result in "foo<SPACE>bar<SPACE>".
Appendix B discusses the rationale for the behavior.
2.6.2. numericString Insignificant Character Handling
For the purposes of this section, a space is defined to be the SPACE
(U+0020) code point followed by no combining marks.
All spaces are regarded as insignificant and are to be removed.
For example, removal of spaces from the Form KC string:
"<SPACE><SPACE>123<SPACE><SPACE>456<SPACE><SPACE>"
would result in the output string:
"123456"
and the Form KC string:
"<SPACE><SPACE><SPACE>"
would result in the output string:
"" (an empty string).
2.6.3. telephoneNumber Insignificant Character Handling
For the purposes of this section, a hyphen is defined to be a
HYPHEN-MINUS (U+002D), ARMENIAN HYPHEN (U+058A), HYPHEN (U+2010),
NON-BREAKING HYPHEN (U+2011), MINUS SIGN (U+2212), SMALL HYPHEN-MINUS
(U+FE63), or FULLWIDTH HYPHEN-MINUS (U+FF0D) code point followed by
Zeilenga Standards Track [Page 7]
RFC 4518 LDAP: Internationalized String Preparation June 2006
no combining marks and a space is defined to be the SPACE (U+0020)
code point followed by no combining marks.
All hyphens and spaces are considered insignificant and are to be
removed.
For example, removal of hyphens and spaces from the Form KC string:
"<SPACE><HYPHEN>123<SPACE><SPACE>456<SPACE><HYPHEN>"
would result in the output string:
"123456"
and the Form KC string:
"<HYPHEN><HYPHEN><HYPHEN>"
would result in the (empty) output string:
"".
3. Security Considerations
"Preparation of Internationalized Strings ("stringprep")" [RFC3454]
security considerations generally apply to the algorithms described
here.
4. Acknowledgements
The approach used in this document is based upon design principles
and algorithms described in "Preparation of Internationalized Strings
('stringprep')" [RFC3454] by Paul Hoffman and Marc Blanchet. Some
additional guidance was drawn from Unicode Technical Standards,
Technical Reports, and Notes.
This document is a product of the IETF LDAP Revision (LDAPBIS)
Working Group.
5. References
5.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3454] Hoffman, P. and M. Blanchet, "Preparation of
Internationalized Strings ("stringprep")", RFC 3454,
December 2002.
[RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol
(LDAP): Technical Specification Road Map", RFC 4510,
June 2006.
Zeilenga Standards Track [Page 8]
RFC 4518 LDAP: Internationalized String Preparation June 2006
[RFC4517] Legg, S., Ed., "Lightweight Directory Access Protocol
(LDAP): Syntaxes and Matching Rules", RFC 4517, June
2006.
[Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version
3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-
61633-5), as amended by the "Unicode Standard Annex
#27: Unicode 3.1"
(http://www.unicode.org/reports/tr27/) and by the
"Unicode Standard Annex #28: Unicode 3.2"
(http://www.unicode.org/reports/tr28/).
[UAX15] Davis, M. and M. Duerst, "Unicode Standard Annex #15:
Unicode Normalization Forms, Version 3.2.0".
<http://www.unicode.org/unicode/reports/tr15/tr15-
22.html>, March 2002.
[X.680] International Telecommunication Union -
Telecommunication Standardization Sector, "Abstract
Syntax Notation One (ASN.1) - Specification of Basic
Notation", X.680(2002) (also ISO/IEC 8824-1:2002).
5.2. Informative References
[X.500] International Telecommunication Union -
Telecommunication Standardization Sector, "The
Directory -- Overview of concepts, models and
services," X.500(1993) (also ISO/IEC 9594-1:1994).
[X.501] International Telecommunication Union -
Telecommunication Standardization Sector, "The
Directory -- Models," X.501(1993) (also ISO/IEC 9594-
2:1994).
[X.520] International Telecommunication Union -
Telecommunication Standardization Sector, "The
Directory: Selected Attribute Types", X.520(1993) (also
ISO/IEC 9594-6:1994).
[Glossary] The Unicode Consortium, "Unicode Glossary",
<http://www.unicode.org/glossary/>.
[CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
#17, Character Encoding Model", UTR17,
<http://www.unicode.org/unicode/reports/tr17/>, August
2000.
Zeilenga Standards Track [Page 9]
RFC 4518 LDAP: Internationalized String Preparation June 2006
[RFC3377] Hodges, J. and R. Morgan, "Lightweight Directory Access
Protocol (v3): Technical Specification", RFC 3377,
September 2002.
[RFC4515] Smith, M., Ed. and T. Howes, "Lightweight Directory
Access Protocol (LDAP): String Representation of Search
Filters", RFC 4515, June 2006.
[XMATCH] Zeilenga, K., "Internationalized String Matching Rules
for X.500", Work in Progress.
Zeilenga Standards Track [Page 10]
RFC 4518 LDAP: Internationalized String Preparation June 2006
Appendix A. Combining Marks
This appendix is normative.
This table was derived from Unicode [Unicode] data files; it lists
all code points with the Mn, Mc, or Me properties. This table is to
be considered definitive for the purposes of implementation of this
specification.
0300-034F 0360-036F 0483-0486 0488-0489 0591-05A1
05A3-05B9 05BB-05BC 05BF 05C1-05C2 05C4 064B-0655 0670
06D6-06DC 06DE-06E4 06E7-06E8 06EA-06ED 0711 0730-074A
07A6-07B0 0901-0903 093C 093E-094F 0951-0954 0962-0963
0981-0983 09BC 09BE-09C4 09C7-09C8 09CB-09CD 09D7
09E2-09E3 0A02 0A3C 0A3E-0A42 0A47-0A48 0A4B-0A4D
0A70-0A71 0A81-0A83 0ABC 0ABE-0AC5 0AC7-0AC9 0ACB-0ACD
0B01-0B03 0B3C 0B3E-0B43 0B47-0B48 0B4B-0B4D 0B56-0B57
0B82 0BBE-0BC2 0BC6-0BC8 0BCA-0BCD 0BD7 0C01-0C03
0C3E-0C44 0C46-0C48 0C4A-0C4D 0C55-0C56 0C82-0C83
0CBE-0CC4 0CC6-0CC8 0CCA-0CCD 0CD5-0CD6 0D02-0D03
0D3E-0D43 0D46-0D48 0D4A-0D4D 0D57 0D82-0D83 0DCA
0DCF-0DD4 0DD6 0DD8-0DDF 0DF2-0DF3 0E31 0E34-0E3A
0E47-0E4E 0EB1 0EB4-0EB9 0EBB-0EBC 0EC8-0ECD 0F18-0F19
0F35 0F37 0F39 0F3E-0F3F 0F71-0F84 0F86-0F87 0F90-0F97
0F99-0FBC 0FC6 102C-1032 1036-1039 1056-1059 1712-1714
1732-1734 1752-1753 1772-1773 17B4-17D3 180B-180D 18A9
20D0-20EA 302A-302F 3099-309A FB1E FE00-FE0F FE20-FE23
1D165-1D169 1D16D-1D172 1D17B-1D182 1D185-1D18B
1D1AA-1D1AD
Appendix B. Substrings Matching
This appendix is non-normative.
In the absence of substrings matching, the insignificant space
handling for case ignore/exact matching could be simplified.
Specifically, the handling could be to require that all sequences of
one or more spaces be replaced with one space and, if the string
contains non-space characters, removal of all leading spaces and
trailing spaces.
In the presence of substrings matching, this simplified space
handling would lead to unexpected and undesirable matching behavior.
For instance:
1) (CN=foo\20*\20bar) would match the CN value "foobar";
Zeilenga Standards Track [Page 11]
RFC 4518 LDAP: Internationalized String Preparation June 2006
2) (CN=*\20foobar\20*) would match "foobar", but
(CN=*\20*foobar*\20*) would not.
Note to readers not familiar with LDAP substrings matching: the LDAP
filter [RFC4515] assertion (CN=A*B*C) says to "match any value (of
the attribute CN) that begins with A, contains B after A, ends with C
where C is also after B."
The first case illustrates that this simplified space handling would
cause leading and trailing spaces in substrings of the string to be
regarded as insignificant. However, only leading and trailing (as
well as multiple consecutive spaces) of the string (as a whole) are
insignificant.
The second case illustrates that this simplified space handling would
cause sub-partitioning failures. That is, if a prepared any
substring matches a partition of the attribute value, then an
assertion constructed by subdividing that substring into multiple
substrings should also match.
In designing an appropriate approach for space handling for
substrings matching, one must study key aspects of X.500 case
exact/ignore matching. X.520 [X.520] says:
The [substrings] rule returns TRUE if there is a partitioning of
the attribute value (into portions) such that:
- the specified substrings (initial, any, final) match
different portions of the value in the order of the strings
sequence;
- initial, if present, matches the first portion of the value;
- final, if present, matches the last portion of the value;
- any, if present, matches some arbitrary portion of the
value.
That is, the substrings assertion (CN=foo\20*\20bar) matches the
attribute value "foo<SPACE><SPACE>bar" as the value can be
partitioned into the portions "foo<SPACE>" and "<SPACE>bar" meeting
the above requirements.
Zeilenga Standards Track [Page 12]
RFC 4518 LDAP: Internationalized String Preparation June 2006
X.520 also says:
[T]he following spaces are regarded as not significant:
- leading spaces (i.e., those preceding the first character
that is not a space);
- trailing spaces (i.e., those following the last character
that is not a space);
- multiple consecutive spaces (these are taken as equivalent
to a single space character).
This statement applies to the assertion values and attribute values
as whole strings, and not individually to substrings of an assertion
value. In particular, the statements should be taken to mean that if
an assertion value and attribute value match without any
consideration to insignificant characters, then that assertion value
should also match any attribute value that differs only by inclusion
nor removal of insignificant characters.
Hence the assertion (CN=foo\20*\20bar) matches
"foo<SPACE><SPACE><SPACE>bar" and "foo<SPACE>bar" as these values
only differ from "foo<SPACE><SPACE>bar" by the inclusion or removal
of insignificant spaces.
Astute readers of this text will also note that there are special
cases where the specified space handling does not ignore spaces that
could be considered insignificant. For instance, the assertion
(CN=\20*\20*\20) does not match "<SPACE><SPACE><SPACE>"
(insignificant spaces present in value) or " " (insignificant spaces
not present in value). However, as these cases have no practical
application that cannot be met by simple assertions, e.g., (cn=\20),
and this minor anomaly can only be fully addressed by a preparation
algorithm to be used in conjunction with character-by-character
partitioning and matching, the anomaly is considered acceptable.
Author's Address
Kurt D. Zeilenga
OpenLDAP Foundation
EMail: Kurt@OpenLDAP.org
Zeilenga Standards Track [Page 13]
RFC 4518 LDAP: Internationalized String Preparation June 2006
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
Zeilenga Standards Track [Page 14]

View File

@ -0,0 +1,90 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: stringprep.py 22551 2008-02-01 16:22:22Z lha $
# Copyright (c) 2008 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import re
import string
def _merge_table(res, source):
for table in source.keys():
res[table] = res.get(table, []) + source.get(table, [])
name_error = ['C.1.2', 'C.2.2', 'C.3', 'C.4', 'C.5', 'C.6', 'C.7', 'C.8', 'C.9']
ldap_error = ['A.1', 'C.3', 'C.4', 'C.5', 'C.8', 'rfc4518-error' ]
sasl_error = ['C.1.2', 'C.2.1', 'C.2.2', 'C.3', 'C.4', 'C.5', 'C.6', 'C.7', 'C.8', 'C.9']
name_map = ['B.1', 'B.2']
ldap_map = ['rfc4518-map', 'B.2']
sasl_map = ['C.1.2', 'B.1']
def symbols(tabledict, tables):
"""return CPP symbols to use for this symbols"""
list = []
for x in tables:
list = list + tabledict.get(x, [])
if len(list) == 0:
return ""
return "|".join(map(lambda x: "WIND_PROFILE_%s" % (string.upper(x)), list))
def get_errorlist():
d = dict()
_merge_table(d, dict(map(lambda x: [x, ['name']], name_error)))
_merge_table(d, dict(map(lambda x: [x, ['ldap']], ldap_error)))
_merge_table(d, dict(map(lambda x: [x, ['sasl']], sasl_error)))
return d
def get_maplist():
d = dict()
_merge_table(d, dict(map(lambda x: [x, ['name']], name_map)))
_merge_table(d, dict(map(lambda x: [x, ['ldap']], ldap_map)))
_merge_table(d, dict(map(lambda x: [x, ['sasl']], sasl_map)))
return d
def sort_merge_trans(trans):
trans.sort()
ret = []
last = 0
for x in trans:
if last:
if last[0] == x[0]:
last = (last[0], last[1], last[2], last[3] + x[3])
else:
ret.append(last)
last = x
else:
last = x
if last:
ret.append(last)
return ret

View File

@ -0,0 +1,48 @@
#!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id: util.py 22551 2008-02-01 16:22:22Z lha $
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Institute nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
def subList(l, sl) :
"""return the index of sl in l or None"""
lLen = len(l)
slLen = len(sl)
for i in range(lLen - slLen + 1):
j = 0
while j < slLen and l[i + j] == sl[j]:
j += 1
if j == slLen:
return i
return None

View File

@ -427,6 +427,46 @@ HEIMDAL_WIND_OBJ_FILES = \
# End SUBSYSTEM HEIMDAL_WIND
#######################
$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/map_table.h
$(heimdalsrcdir)/lib/wind/map_table.h $(heimdalsrcdir)/lib/wind/map_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/stringprep.py
$(PYTHON) $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
clean::
@rm -f $(heimdalsrcdir)/lib/wind/map_table.h $(heimdalsrcdir)/lib/wind/map_table.c
$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/errorlist_table.h
$(heimdalsrcdir)/lib/wind/errorlist_table.h $(heimdalsrcdir)/lib/wind/errorlist_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-errorlist.py $(heimdalsrcdir)/lib/wind/stringprep.py
$(PYTHON) $(heimdalsrcdir)/lib/wind/gen-errorlist.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
clean::
@rm -f $(heimdalsrcdir)/lib/wind/errorlist_table.h $(heimdalsrcdir)/lib/wind/errorlist_table.c
$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/normalize_table.h
$(heimdalsrcdir)/lib/wind/normalize_table.h $(heimdalsrcdir)/lib/wind/normalize_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/gen-normalize.py
$(PYTHON) $(heimdalsrcdir)/lib/wind/gen-normalize.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/
clean::
@rm -f $(heimdalsrcdir)/lib/wind/normalize_table.h $(heimdalsrcdir)/lib/wind/normalize_table.c
$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/combining_table.h
$(heimdalsrcdir)/lib/wind/combining_table.h $(heimdalsrcdir)/lib/wind/combining_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/gen-combining.py
$(PYTHON) $(heimdalsrcdir)/lib/wind/gen-combining.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/
clean::
@rm -f $(heimdalsrcdir)/lib/wind/combining_table.h $(heimdalsrcdir)/lib/wind/combining_table.c
$(HEIMDAL_WIND_OBJ_FILES) $(HEIMDAL_WIND_OBJ_FILES:.o=.d):: $(heimdalsrcdir)/lib/wind/bidi_table.h
$(heimdalsrcdir)/lib/wind/bidi_table.h $(heimdalsrcdir)/lib/wind/bidi_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-bidi.py
$(PYTHON) $(heimdalsrcdir)/lib/wind/gen-bidi.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
clean::
@rm -f $(heimdalsrcdir)/lib/wind/bidi_table.h $(heimdalsrcdir)/lib/wind/bidi_table.c
[SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME]
HEIMDAL_ROKEN_GETPROGNAME_OBJ_FILES = $(heimdalsrcdir)/lib/roken/getprogname.o