/src/gnutls/lib/priority_options.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* ANSI-C code produced by gperf version 3.1 */ |
2 | | /* Command-line: gperf --global-table -t priority_options.gperf */ |
3 | | /* Computed positions: -k'1,$' */ |
4 | | |
5 | | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
6 | | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ |
7 | | && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ |
8 | | && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ |
9 | | && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ |
10 | | && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ |
11 | | && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ |
12 | | && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ |
13 | | && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ |
14 | | && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ |
15 | | && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ |
16 | | && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ |
17 | | && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ |
18 | | && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ |
19 | | && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ |
20 | | && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ |
21 | | && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ |
22 | | && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ |
23 | | && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ |
24 | | && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ |
25 | | && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ |
26 | | && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ |
27 | | && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) |
28 | | /* The character set is not based on ISO-646. */ |
29 | | #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>." |
30 | | #endif |
31 | | |
32 | | #line 1 "priority_options.gperf" |
33 | | |
34 | | typedef void (*option_set_func)(gnutls_priority_t); |
35 | | #line 6 "priority_options.gperf" |
36 | | struct priority_options_st { const char *name; option_set_func func; }; |
37 | | |
38 | | #define TOTAL_KEYWORDS 39 |
39 | 0 | #define MIN_WORD_LENGTH 6 |
40 | 0 | #define MAX_WORD_LENGTH 32 |
41 | | #define MIN_HASH_VALUE 6 |
42 | 0 | #define MAX_HASH_VALUE 66 |
43 | | /* maximum key range = 61, duplicates = 0 */ |
44 | | |
45 | | #ifdef __GNUC__ |
46 | | __inline |
47 | | #else |
48 | | #ifdef __cplusplus |
49 | | inline |
50 | | #endif |
51 | | #endif |
52 | | static unsigned int |
53 | | hash (register const char *str, register size_t len) |
54 | 0 | { |
55 | 0 | static const unsigned char asso_values[] = |
56 | 0 | { |
57 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
58 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
59 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
60 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
61 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 35, |
62 | 0 | 25, 67, 67, 5, 67, 67, 40, 67, 67, 67, |
63 | 0 | 67, 67, 67, 67, 67, 0, 10, 67, 0, 0, |
64 | 0 | 67, 10, 5, 67, 67, 5, 67, 20, 0, 25, |
65 | 0 | 67, 0, 67, 15, 10, 67, 0, 0, 67, 10, |
66 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
67 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
68 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
69 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
70 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
71 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
72 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
73 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
74 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
75 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
76 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
77 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
78 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
79 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
80 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
81 | 0 | 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, |
82 | 0 | 67, 67, 67, 67, 67, 67, 67 |
83 | 0 | }; |
84 | 0 | return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]+1]; |
85 | 0 | } |
86 | | |
87 | | static const struct priority_options_st wordlist[] = |
88 | | { |
89 | | {""}, {""}, {""}, {""}, {""}, {""}, |
90 | | #line 9 "priority_options.gperf" |
91 | | {"DUMBFW", enable_dumbfw}, |
92 | | {""}, {""}, {""}, {""}, |
93 | | #line 34 "priority_options.gperf" |
94 | | {"PROFILE_LOW", enable_profile_low}, |
95 | | {""}, |
96 | | #line 38 "priority_options.gperf" |
97 | | {"PROFILE_ULTRA", enable_profile_ultra}, |
98 | | #line 39 "priority_options.gperf" |
99 | | {"PROFILE_FUTURE", enable_profile_future}, |
100 | | {""}, |
101 | | #line 8 "priority_options.gperf" |
102 | | {"COMPAT", enable_compat}, |
103 | | #line 37 "priority_options.gperf" |
104 | | {"PROFILE_HIGH", enable_profile_high}, |
105 | | {""}, |
106 | | #line 19 "priority_options.gperf" |
107 | | {"VERIFY_ALLOW_BROKEN", enable_verify_allow_broken}, |
108 | | #line 26 "priority_options.gperf" |
109 | | {"UNSAFE_RENEGOTIATION", enable_unsafe_renegotiation}, |
110 | | #line 28 "priority_options.gperf" |
111 | | {"PARTIAL_RENEGOTIATION", enable_partial_safe_renegotiation}, |
112 | | #line 33 "priority_options.gperf" |
113 | | {"PROFILE_VERY_WEAK", enable_profile_very_weak}, |
114 | | #line 30 "priority_options.gperf" |
115 | | {"FALLBACK_SCSV", enable_fallback_scsv}, |
116 | | #line 35 "priority_options.gperf" |
117 | | {"PROFILE_LEGACY", enable_profile_legacy}, |
118 | | #line 45 "priority_options.gperf" |
119 | | {"DISABLE_TLS13_COMPAT_MODE", disable_tls13_compat_mode}, |
120 | | #line 29 "priority_options.gperf" |
121 | | {"DISABLE_SAFE_RENEGOTIATION", disable_safe_renegotiation}, |
122 | | #line 32 "priority_options.gperf" |
123 | | {"SERVER_PRECEDENCE", enable_server_precedence}, |
124 | | #line 27 "priority_options.gperf" |
125 | | {"SAFE_RENEGOTIATION", enable_safe_renegotiation}, |
126 | | #line 23 "priority_options.gperf" |
127 | | {"SSL3_RECORD_VERSION", enable_ssl3_record_version}, |
128 | | #line 20 "priority_options.gperf" |
129 | | {"VERIFY_ALLOW_SIGN_RSA_MD5", enable_verify_allow_rsa_md5}, |
130 | | #line 18 "priority_options.gperf" |
131 | | {"STATELESS_COMPRESSION", dummy_func}, |
132 | | #line 31 "priority_options.gperf" |
133 | | {"DISABLE_WILDCARDS", disable_wildcards}, |
134 | | #line 16 "priority_options.gperf" |
135 | | {"FORCE_SESSION_HASH", enable_force_ext_master_secret}, |
136 | | #line 36 "priority_options.gperf" |
137 | | {"PROFILE_MEDIUM", enable_profile_medium}, |
138 | | {""}, {""}, |
139 | | #line 25 "priority_options.gperf" |
140 | | {"VERIFY_ALLOW_X509_V1_CA_CRT", dummy_func}, |
141 | | {""}, |
142 | | #line 14 "priority_options.gperf" |
143 | | {"FORCE_ETM", enable_force_etm}, |
144 | | #line 22 "priority_options.gperf" |
145 | | {"VERIFY_DISABLE_CRL_CHECKS", disable_crl_checks}, |
146 | | #line 24 "priority_options.gperf" |
147 | | {"LATEST_RECORD_VERSION", enable_latest_record_version}, |
148 | | #line 41 "priority_options.gperf" |
149 | | {"PROFILE_SUITEB192", enable_profile_suiteb192}, |
150 | | {""}, |
151 | | #line 44 "priority_options.gperf" |
152 | | {"ALLOW_SMALL_RECORDS", enable_allow_small_records}, |
153 | | #line 15 "priority_options.gperf" |
154 | | {"NO_SESSION_HASH", enable_no_ext_master_secret}, |
155 | | #line 42 "priority_options.gperf" |
156 | | {"NEW_PADDING", dummy_func}, |
157 | | #line 43 "priority_options.gperf" |
158 | | {"DEBUG_ALLOW_KEY_USAGE_VIOLATIONS", enable_server_key_usage_violations}, |
159 | | {""}, {""}, |
160 | | #line 11 "priority_options.gperf" |
161 | | {"NO_TICKETS", enable_no_tickets}, |
162 | | #line 13 "priority_options.gperf" |
163 | | {"NO_ETM", enable_no_etm}, |
164 | | #line 17 "priority_options.gperf" |
165 | | {"NO_STATUS_REQUEST", enable_no_status_request}, |
166 | | #line 10 "priority_options.gperf" |
167 | | {"NO_EXTENSIONS", enable_no_extensions}, |
168 | | {""}, {""}, {""}, |
169 | | #line 40 "priority_options.gperf" |
170 | | {"PROFILE_SUITEB128", enable_profile_suiteb128}, |
171 | | {""}, {""}, {""}, |
172 | | #line 46 "priority_options.gperf" |
173 | | {"NO_SHUFFLE_EXTENSIONS", enable_no_shuffle_extensions}, |
174 | | #line 21 "priority_options.gperf" |
175 | | {"VERIFY_ALLOW_SIGN_WITH_SHA1", enable_verify_allow_sha1}, |
176 | | {""}, {""}, {""}, |
177 | | #line 12 "priority_options.gperf" |
178 | | {"NO_TICKETS_TLS12", enable_no_tickets_tls12} |
179 | | }; |
180 | | |
181 | | static const struct priority_options_st * |
182 | | in_word_set (register const char *str, register size_t len) |
183 | 0 | { |
184 | 0 | if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) |
185 | 0 | { |
186 | 0 | register unsigned int key = hash (str, len); |
187 | |
|
188 | 0 | if (key <= MAX_HASH_VALUE) |
189 | 0 | { |
190 | 0 | register const char *s = wordlist[key].name; |
191 | |
|
192 | 0 | if (*str == *s && !strcmp (str + 1, s + 1)) |
193 | 0 | return &wordlist[key]; |
194 | 0 | } |
195 | 0 | } |
196 | 0 | return 0; |
197 | 0 | } |