Print this page
4853 illumos-gate is not lint-clean when built with openssl 1.0
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/openssl/libsunw_crypto/pl/keysets.pl
+++ new/usr/src/lib/openssl/libsunw_crypto/pl/keysets.pl
1 -#!/usr/local/bin/perl
1 +#!/usr/bin/perl
2 2
3 3 $NUMBER=0x01;
4 4 $UPPER=0x02;
5 5 $LOWER=0x04;
6 6 $UNDER=0x100;
7 7 $PUNCTUATION=0x200;
8 8 $WS=0x10;
9 9 $ESC=0x20;
10 10 $QUOTE=0x40;
11 11 $DQUOTE=0x400;
12 12 $COMMENT=0x80;
13 13 $FCOMMENT=0x800;
14 14 $EOF=0x08;
15 15 $HIGHBIT=0x1000;
16 16
17 17 foreach (0 .. 255)
18 18 {
19 19 $v=0;
20 20 $c=sprintf("%c",$_);
21 21 $v|=$NUMBER if ($c =~ /[0-9]/);
22 22 $v|=$UPPER if ($c =~ /[A-Z]/);
23 23 $v|=$LOWER if ($c =~ /[a-z]/);
24 24 $v|=$UNDER if ($c =~ /_/);
25 25 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
26 26 $v|=$WS if ($c =~ /[ \t\r\n]/);
27 27 $v|=$ESC if ($c =~ /\\/);
28 28 $v|=$QUOTE if ($c =~ /['`"]/); # for emacs: "`'}/)
29 29 $v|=$COMMENT if ($c =~ /\#/);
30 30 $v|=$EOF if ($c =~ /\0/);
31 31 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
32 32
33 33 push(@V_def,$v);
34 34 }
35 35
36 36 foreach (0 .. 255)
37 37 {
38 38 $v=0;
39 39 $c=sprintf("%c",$_);
40 40 $v|=$NUMBER if ($c =~ /[0-9]/);
41 41 $v|=$UPPER if ($c =~ /[A-Z]/);
42 42 $v|=$LOWER if ($c =~ /[a-z]/);
43 43 $v|=$UNDER if ($c =~ /_/);
44 44 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
45 45 $v|=$WS if ($c =~ /[ \t\r\n]/);
46 46 $v|=$DQUOTE if ($c =~ /["]/); # for emacs: "}/)
47 47 $v|=$FCOMMENT if ($c =~ /;/);
48 48 $v|=$EOF if ($c =~ /\0/);
49 49 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
50 50
51 51 push(@V_w32,$v);
52 52 }
53 53
54 54 print <<"EOF";
55 55 /* crypto/conf/conf_def.h */
56 56 /* Copyright (C) 1995-1998 Eric Young (eay\@cryptsoft.com)
57 57 * All rights reserved.
58 58 *
59 59 * This package is an SSL implementation written
60 60 * by Eric Young (eay\@cryptsoft.com).
61 61 * The implementation was written so as to conform with Netscapes SSL.
62 62 *
63 63 * This library is free for commercial and non-commercial use as long as
64 64 * the following conditions are aheared to. The following conditions
65 65 * apply to all code found in this distribution, be it the RC4, RSA,
66 66 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
67 67 * included with this distribution is covered by the same copyright terms
68 68 * except that the holder is Tim Hudson (tjh\@cryptsoft.com).
69 69 *
70 70 * Copyright remains Eric Young's, and as such any Copyright notices in
71 71 * the code are not to be removed.
72 72 * If this package is used in a product, Eric Young should be given attribution
73 73 * as the author of the parts of the library used.
74 74 * This can be in the form of a textual message at program startup or
75 75 * in documentation (online or textual) provided with the package.
76 76 *
77 77 * Redistribution and use in source and binary forms, with or without
78 78 * modification, are permitted provided that the following conditions
79 79 * are met:
80 80 * 1. Redistributions of source code must retain the copyright
81 81 * notice, this list of conditions and the following disclaimer.
82 82 * 2. Redistributions in binary form must reproduce the above copyright
83 83 * notice, this list of conditions and the following disclaimer in the
84 84 * documentation and/or other materials provided with the distribution.
85 85 * 3. All advertising materials mentioning features or use of this software
86 86 * must display the following acknowledgement:
87 87 * "This product includes cryptographic software written by
88 88 * Eric Young (eay\@cryptsoft.com)"
89 89 * The word 'cryptographic' can be left out if the rouines from the library
90 90 * being used are not cryptographic related :-).
91 91 * 4. If you include any Windows specific code (or a derivative thereof) from
92 92 * the apps directory (application code) you must include an acknowledgement:
93 93 * "This product includes software written by Tim Hudson (tjh\@cryptsoft.com)"
94 94 *
95 95 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
96 96 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
97 97 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
98 98 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
99 99 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
100 100 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
101 101 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
102 102 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
103 103 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
104 104 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
105 105 * SUCH DAMAGE.
106 106 *
107 107 * The licence and distribution terms for any publically available version or
108 108 * derivative of this code cannot be changed. i.e. this code cannot simply be
109 109 * copied and put under another distribution licence
110 110 * [including the GNU Public Licence.]
111 111 */
112 112
113 113 /* THIS FILE WAS AUTOMAGICALLY GENERATED!
114 114 Please modify and use keysets.pl to regenerate it. */
115 115
116 116 #define CONF_NUMBER $NUMBER
117 117 #define CONF_UPPER $UPPER
118 118 #define CONF_LOWER $LOWER
119 119 #define CONF_UNDER $UNDER
120 120 #define CONF_PUNCTUATION $PUNCTUATION
121 121 #define CONF_WS $WS
122 122 #define CONF_ESC $ESC
123 123 #define CONF_QUOTE $QUOTE
124 124 #define CONF_DQUOTE $DQUOTE
125 125 #define CONF_COMMENT $COMMENT
126 126 #define CONF_FCOMMENT $FCOMMENT
127 127 #define CONF_EOF $EOF
128 128 #define CONF_HIGHBIT $HIGHBIT
129 129 #define CONF_ALPHA (CONF_UPPER|CONF_LOWER)
130 130 #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
131 131 #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\
132 132 CONF_PUNCTUATION)
133 133
134 134 #define KEYTYPES(c) ((unsigned short *)((c)->meth_data))
135 135 #ifndef CHARSET_EBCDIC
136 136 #define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
137 137 #define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
138 138 #define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF)
139 139 #define IS_ESC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ESC)
140 140 #define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
141 141 #define IS_WS(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_WS)
142 142 #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
143 143 #define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
144 144 (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
145 145 #define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
146 146 #define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
147 147 #define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
148 148
149 149 #else /*CHARSET_EBCDIC*/
150 150
151 151 #define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT)
152 152 #define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT)
153 153 #define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF)
154 154 #define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC)
155 155 #define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER)
156 156 #define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS)
157 157 #define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC)
158 158 #define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
159 159 (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
160 160 #define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE)
161 161 #define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE)
162 162 #define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT)
163 163 #endif /*CHARSET_EBCDIC*/
164 164
165 165 EOF
166 166
167 167 print "static unsigned short CONF_type_default[256]={";
168 168
169 169 for ($i=0; $i<256; $i++)
170 170 {
171 171 print "\n\t" if ($i % 8) == 0;
172 172 printf "0x%04X,",$V_def[$i];
173 173 }
174 174
175 175 print "\n\t};\n\n";
176 176
177 177 print "static unsigned short CONF_type_win32[256]={";
178 178
179 179 for ($i=0; $i<256; $i++)
180 180 {
181 181 print "\n\t" if ($i % 8) == 0;
182 182 printf "0x%04X,",$V_w32[$i];
183 183 }
184 184
185 185 print "\n\t};\n\n";
↓ open down ↓ |
174 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX