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 34
39 #define MIN_WORD_LENGTH 6
40 #define MAX_WORD_LENGTH 32
41 #define MIN_HASH_VALUE 6
42 #define MAX_HASH_VALUE 52
43 /* maximum key range = 47, duplicates = 0 */
44 
45 #ifdef __GNUC__
46 __inline
47 #else
48 #ifdef __cplusplus
49 inline
50 #endif
51 #endif
52 static unsigned int
hash(register const char * str,register size_t len)53 hash (register const char *str, register size_t len)
54 {
55   static const unsigned char asso_values[] =
56     {
57       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
58       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
59       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
60       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
61       53, 53, 53, 53, 53, 53, 53, 53, 53, 25,
62       30, 53, 53,  5, 53, 53,  5, 53, 53, 53,
63       53, 53, 53, 53, 53,  5, 53, 35,  0, 10,
64        0, 30,  0, 53, 53,  0, 15,  0,  0, 53,
65        0, 53, 53, 10,  5,  5,  0,  5, 53, 25,
66       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
67       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
68       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
69       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
70       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
71       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
72       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
73       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
74       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
75       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
76       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
77       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
78       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
79       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
80       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
81       53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
82       53, 53, 53, 53, 53, 53
83     };
84   return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
85 }
86 
87 static const struct priority_options_st wordlist[] =
88   {
89     {""}, {""}, {""}, {""}, {""}, {""},
90 #line 12 "priority_options.gperf"
91     {"NO_ETM", enable_no_etm},
92     {""}, {""},
93 #line 13 "priority_options.gperf"
94     {"FORCE_ETM", enable_force_etm},
95     {""},
96 #line 9 "priority_options.gperf"
97     {"DUMBFW", enable_dumbfw},
98 #line 34 "priority_options.gperf"
99     {"PROFILE_HIGH", enable_profile_high},
100 #line 27 "priority_options.gperf"
101     {"FALLBACK_SCSV", enable_fallback_scsv},
102 #line 33 "priority_options.gperf"
103     {"PROFILE_MEDIUM", enable_profile_medium},
104 #line 14 "priority_options.gperf"
105     {"NO_SESSION_HASH", enable_no_ext_master_secret},
106 #line 31 "priority_options.gperf"
107     {"PROFILE_LOW", enable_profile_low},
108 #line 30 "priority_options.gperf"
109     {"PROFILE_VERY_WEAK", enable_profile_very_weak},
110 #line 35 "priority_options.gperf"
111     {"PROFILE_ULTRA", enable_profile_ultra},
112 #line 16 "priority_options.gperf"
113     {"VERIFY_ALLOW_BROKEN", enable_verify_allow_broken},
114 #line 11 "priority_options.gperf"
115     {"NO_TICKETS", enable_no_tickets},
116 #line 25 "priority_options.gperf"
117     {"PARTIAL_RENEGOTIATION", enable_partial_safe_renegotiation},
118 #line 37 "priority_options.gperf"
119     {"PROFILE_SUITEB128", enable_profile_suiteb128},
120 #line 10 "priority_options.gperf"
121     {"NO_EXTENSIONS", enable_no_extensions},
122 #line 36 "priority_options.gperf"
123     {"PROFILE_FUTURE", enable_profile_future},
124 #line 23 "priority_options.gperf"
125     {"UNSAFE_RENEGOTIATION", enable_unsafe_renegotiation},
126 #line 26 "priority_options.gperf"
127     {"DISABLE_SAFE_RENEGOTIATION", disable_safe_renegotiation},
128 #line 28 "priority_options.gperf"
129     {"DISABLE_WILDCARDS", disable_wildcards},
130 #line 24 "priority_options.gperf"
131     {"SAFE_RENEGOTIATION", enable_safe_renegotiation},
132 #line 20 "priority_options.gperf"
133     {"SSL3_RECORD_VERSION", enable_ssl3_record_version},
134 #line 17 "priority_options.gperf"
135     {"VERIFY_ALLOW_SIGN_RSA_MD5", enable_verify_allow_rsa_md5},
136 #line 15 "priority_options.gperf"
137     {"STATELESS_COMPRESSION", dummy_func},
138 #line 22 "priority_options.gperf"
139     {"VERIFY_ALLOW_X509_V1_CA_CRT", dummy_func},
140     {""},
141 #line 41 "priority_options.gperf"
142     {"ALLOW_SMALL_RECORDS", enable_allow_small_records},
143 #line 19 "priority_options.gperf"
144     {"VERIFY_DISABLE_CRL_CHECKS", disable_crl_checks},
145 #line 21 "priority_options.gperf"
146     {"LATEST_RECORD_VERSION", enable_latest_record_version},
147 #line 29 "priority_options.gperf"
148     {"SERVER_PRECEDENCE", enable_server_precedence},
149     {""},
150 #line 32 "priority_options.gperf"
151     {"PROFILE_LEGACY", enable_profile_legacy},
152     {""},
153 #line 39 "priority_options.gperf"
154     {"NEW_PADDING", dummy_func},
155 #line 40 "priority_options.gperf"
156     {"DEBUG_ALLOW_KEY_USAGE_VIOLATIONS", enable_server_key_usage_violations},
157     {""}, {""}, {""},
158 #line 8 "priority_options.gperf"
159     {"COMPAT", enable_compat},
160 #line 38 "priority_options.gperf"
161     {"PROFILE_SUITEB192", enable_profile_suiteb192},
162     {""}, {""}, {""}, {""},
163 #line 18 "priority_options.gperf"
164     {"VERIFY_ALLOW_SIGN_WITH_SHA1", enable_verify_allow_sha1}
165   };
166 
167 static const struct priority_options_st *
in_word_set(register const char * str,register size_t len)168 in_word_set (register const char *str, register size_t len)
169 {
170   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
171     {
172       register unsigned int key = hash (str, len);
173 
174       if (key <= MAX_HASH_VALUE)
175         {
176           register const char *s = wordlist[key].name;
177 
178           if (*str == *s && !strcmp (str + 1, s + 1))
179             return &wordlist[key];
180         }
181     }
182   return 0;
183 }
184