Coverage Report

Created: 2023-03-26 08:33

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