2 # Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
27 $v|=$NUMBER if ($c =~ /[0-9]/);
28 $v|=$UPPER if ($c =~ /[A-Z]/);
29 $v|=$LOWER if ($c =~ /[a-z]/);
30 $v|=$UNDER if ($c =~ /_/);
31 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
32 $v|=$WS if ($c =~ /[ \t\r\n]/);
33 $v|=$ESC if ($c =~ /\\/);
34 $v|=$QUOTE if ($c =~ /['`"]/); # for emacs: "`'}/)
35 $v|=$COMMENT if ($c =~ /\#/);
36 $v|=$EOF if ($c =~ /\0/);
37 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
46 $v|=$NUMBER if ($c =~ /[0-9]/);
47 $v|=$UPPER if ($c =~ /[A-Z]/);
48 $v|=$LOWER if ($c =~ /[a-z]/);
49 $v|=$UNDER if ($c =~ /_/);
50 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
51 $v|=$WS if ($c =~ /[ \t\r\n]/);
52 $v|=$DQUOTE if ($c =~ /["]/); # for emacs: "}/)
53 $v|=$FCOMMENT if ($c =~ /;/);
54 $v|=$EOF if ($c =~ /\0/);
55 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
60 # Output year depends on the year of the script.
61 my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
64 * WARNING: do not edit!
65 * Generated by crypto/conf/keysets.pl
67 * Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved.
68 * Licensed under the OpenSSL license (the "License"). You may not use
69 * this file except in compliance with the License. You can obtain a copy
70 * in the file LICENSE in the source distribution or at
71 * https://www.openssl.org/source/license.html
74 #define CONF_NUMBER $NUMBER
75 #define CONF_UPPER $UPPER
76 #define CONF_LOWER $LOWER
77 #define CONF_UNDER $UNDER
78 #define CONF_PUNCTUATION $PUNCTUATION
81 #define CONF_QUOTE $QUOTE
82 #define CONF_DQUOTE $DQUOTE
83 #define CONF_COMMENT $COMMENT
84 #define CONF_FCOMMENT $FCOMMENT
86 #define CONF_HIGHBIT $HIGHBIT
87 #define CONF_ALPHA (CONF_UPPER|CONF_LOWER)
88 #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
89 #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\
92 #define KEYTYPES(c) ((const unsigned short *)((c)->meth_data))
93 #ifndef CHARSET_EBCDIC
94 # define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
95 # define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
96 # define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF)
97 # define IS_ESC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ESC)
98 # define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
99 # define IS_WS(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_WS)
100 # define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
101 # define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
102 (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
103 # define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
104 # define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
105 # define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
107 #else /* CHARSET_EBCDIC */
109 # define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_COMMENT)
110 # define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_FCOMMENT)
111 # define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_EOF)
112 # define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ESC)
113 # define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_NUMBER)
114 # define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_WS)
115 # define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC)
116 # define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
117 (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC_PUNCT)
118 # define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_QUOTE)
119 # define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_DQUOTE)
120 # define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_HIGHBIT)
121 #endif /* CHARSET_EBCDIC */
125 print "static const unsigned short CONF_type_default[256] = {";
127 for ($i=0; $i<256; $i++)
129 print "\n " if ($i % 8) == 0;
130 printf " 0x%04X,",$V_def[$i];
135 print "static const unsigned short CONF_type_win32[256] = {";
137 for ($i=0; $i<256; $i++)
139 print "\n " if ($i % 8) == 0;
140 printf " 0x%04X,",$V_w32[$i];