xref: /openbsd-src/lib/libcrypto/conf/conf_def.h (revision bf20285611a855bfa4173a88ea891fdb4bf81ba5)
1*bf202856Stb /* $OpenBSD: conf_def.h,v 1.8 2024/08/31 09:36:38 tb Exp $ */
2c109e398Sbeck /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3c109e398Sbeck  * All rights reserved.
4c109e398Sbeck  *
5c109e398Sbeck  * This package is an SSL implementation written
6c109e398Sbeck  * by Eric Young (eay@cryptsoft.com).
7c109e398Sbeck  * The implementation was written so as to conform with Netscapes SSL.
8c109e398Sbeck  *
9c109e398Sbeck  * This library is free for commercial and non-commercial use as long as
10c109e398Sbeck  * the following conditions are aheared to.  The following conditions
11c109e398Sbeck  * apply to all code found in this distribution, be it the RC4, RSA,
12c109e398Sbeck  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
13c109e398Sbeck  * included with this distribution is covered by the same copyright terms
14c109e398Sbeck  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15c109e398Sbeck  *
16c109e398Sbeck  * Copyright remains Eric Young's, and as such any Copyright notices in
17c109e398Sbeck  * the code are not to be removed.
18c109e398Sbeck  * If this package is used in a product, Eric Young should be given attribution
19c109e398Sbeck  * as the author of the parts of the library used.
20c109e398Sbeck  * This can be in the form of a textual message at program startup or
21c109e398Sbeck  * in documentation (online or textual) provided with the package.
22c109e398Sbeck  *
23c109e398Sbeck  * Redistribution and use in source and binary forms, with or without
24c109e398Sbeck  * modification, are permitted provided that the following conditions
25c109e398Sbeck  * are met:
26c109e398Sbeck  * 1. Redistributions of source code must retain the copyright
27c109e398Sbeck  *    notice, this list of conditions and the following disclaimer.
28c109e398Sbeck  * 2. Redistributions in binary form must reproduce the above copyright
29c109e398Sbeck  *    notice, this list of conditions and the following disclaimer in the
30c109e398Sbeck  *    documentation and/or other materials provided with the distribution.
31c109e398Sbeck  * 3. All advertising materials mentioning features or use of this software
32c109e398Sbeck  *    must display the following acknowledgement:
33c109e398Sbeck  *    "This product includes cryptographic software written by
34c109e398Sbeck  *     Eric Young (eay@cryptsoft.com)"
35c109e398Sbeck  *    The word 'cryptographic' can be left out if the rouines from the library
36c109e398Sbeck  *    being used are not cryptographic related :-).
37c109e398Sbeck  * 4. If you include any Windows specific code (or a derivative thereof) from
38c109e398Sbeck  *    the apps directory (application code) you must include an acknowledgement:
39c109e398Sbeck  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40c109e398Sbeck  *
41c109e398Sbeck  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42c109e398Sbeck  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43c109e398Sbeck  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44c109e398Sbeck  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45c109e398Sbeck  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46c109e398Sbeck  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47c109e398Sbeck  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48c109e398Sbeck  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49c109e398Sbeck  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50c109e398Sbeck  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51c109e398Sbeck  * SUCH DAMAGE.
52c109e398Sbeck  *
53c109e398Sbeck  * The licence and distribution terms for any publically available version or
54c109e398Sbeck  * derivative of this code cannot be changed.  i.e. this code cannot simply be
55c109e398Sbeck  * copied and put under another distribution licence
56c109e398Sbeck  * [including the GNU Public Licence.]
57c109e398Sbeck  */
58c109e398Sbeck 
59c109e398Sbeck /* THIS FILE WAS AUTOMAGICALLY GENERATED!
60c109e398Sbeck    Please modify and use keysets.pl to regenerate it. */
61c109e398Sbeck 
629c014357Sjsing __BEGIN_HIDDEN_DECLS
639c014357Sjsing 
64c109e398Sbeck #define CONF_NUMBER		1
65c109e398Sbeck #define CONF_UPPER		2
66c109e398Sbeck #define CONF_LOWER		4
67c109e398Sbeck #define CONF_UNDER		256
68c109e398Sbeck #define CONF_PUNCTUATION	512
69c109e398Sbeck #define CONF_WS			16
70c109e398Sbeck #define CONF_ESC		32
71c109e398Sbeck #define CONF_QUOTE		64
72c109e398Sbeck #define CONF_DQUOTE		1024
73c109e398Sbeck #define CONF_COMMENT		128
74c109e398Sbeck #define CONF_FCOMMENT		2048
75c109e398Sbeck #define CONF_EOF		8
76da347917Sbeck #define CONF_HIGHBIT		4096
77c109e398Sbeck #define CONF_ALPHA		(CONF_UPPER|CONF_LOWER)
78c109e398Sbeck #define CONF_ALPHA_NUMERIC	(CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
79c109e398Sbeck #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \
80c109e398Sbeck 					CONF_PUNCTUATION)
81c109e398Sbeck 
82*bf202856Stb static const unsigned short	CONF_type_default[256];
83*bf202856Stb 
84*bf202856Stb #define KEYTYPES(c)		(CONF_type_default)
85da347917Sbeck #define IS_COMMENT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
86da347917Sbeck #define IS_FCOMMENT(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
87da347917Sbeck #define IS_EOF(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_EOF)
88da347917Sbeck #define IS_ESC(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_ESC)
89da347917Sbeck #define IS_NUMBER(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
90da347917Sbeck #define IS_WS(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_WS)
91da347917Sbeck #define IS_ALPHA_NUMERIC(c,a)	(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
92c109e398Sbeck #define IS_ALPHA_NUMERIC_PUNCT(c,a) \
93da347917Sbeck 				(KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
94da347917Sbeck #define IS_QUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
95da347917Sbeck #define IS_DQUOTE(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
96da347917Sbeck #define IS_HIGHBIT(c,a)		(KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
97c109e398Sbeck 
98*bf202856Stb static const unsigned short CONF_type_default[256] = {
99da347917Sbeck 	0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
100da347917Sbeck 	0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000,
101da347917Sbeck 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
102da347917Sbeck 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
103da347917Sbeck 	0x0010, 0x0200, 0x0040, 0x0080, 0x0000, 0x0200, 0x0200, 0x0040,
104da347917Sbeck 	0x0000, 0x0000, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200,
105da347917Sbeck 	0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,
106da347917Sbeck 	0x0001, 0x0001, 0x0000, 0x0200, 0x0000, 0x0000, 0x0000, 0x0200,
107da347917Sbeck 	0x0200, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
108da347917Sbeck 	0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
109da347917Sbeck 	0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
110da347917Sbeck 	0x0002, 0x0002, 0x0002, 0x0000, 0x0020, 0x0000, 0x0200, 0x0100,
111da347917Sbeck 	0x0040, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
112da347917Sbeck 	0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
113da347917Sbeck 	0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
114da347917Sbeck 	0x0004, 0x0004, 0x0004, 0x0000, 0x0200, 0x0000, 0x0200, 0x0000,
115da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
116da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
117da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
118da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
119da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
120da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
121da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
122da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
123da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
124da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
125da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
126da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
127da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
128da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
129da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
130da347917Sbeck 	0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
131c109e398Sbeck };
132c109e398Sbeck 
1339c014357Sjsing __END_HIDDEN_DECLS
134