| Line | Source | Count |
| 1 | typedef struct { | - |
| 2 | const char *name; | - |
| 3 | int namelen; | - |
| 4 | unsigned int name_flags; | - |
| 5 | unsigned long option_value; | - |
| 6 | } ssl_flag_tbl; | - |
| 7 | | - |
| 8 | | - |
| 9 | typedef struct { | - |
| 10 | unsigned long option_value; | - |
| 11 | unsigned int name_flags; | - |
| 12 | } ssl_switch_tbl; | - |
| 13 | struct ssl_conf_ctx_st { | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | unsigned int flags; | - |
| 19 | | - |
| 20 | char *prefix; | - |
| 21 | size_t prefixlen; | - |
| 22 | | - |
| 23 | SSL_CTX *ctx; | - |
| 24 | SSL *ssl; | - |
| 25 | | - |
| 26 | uint32_t *poptions; | - |
| 27 | | - |
| 28 | char *cert_filename[9]; | - |
| 29 | | - |
| 30 | uint32_t *pcert_flags; | - |
| 31 | | - |
| 32 | uint32_t *pvfy_flags; | - |
| 33 | | - |
| 34 | int *min_version; | - |
| 35 | | - |
| 36 | int *max_version; | - |
| 37 | | - |
| 38 | const ssl_flag_tbl *tbl; | - |
| 39 | | - |
| 40 | size_t ntbl; | - |
| 41 | | - |
| 42 | struct stack_st_X509_NAME *canames; | - |
| 43 | }; | - |
| 44 | | - |
| 45 | static void ssl_set_option(SSL_CONF_CTX *cctx, unsigned int name_flags, | - |
| 46 | unsigned long option_value, int onoff) | - |
| 47 | { | - |
| 48 | uint32_t *pflags; | - |
| 49 | if (cctx->poptions == | TRUE | never evaluated | | FALSE | evaluated 1800 times by 1 test |
| 0-1800 |
| 50 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1800 times by 1 test |
| 0-1800 |
| 51 | ) | - |
| 52 | return; never executed: return; | 0 |
| 53 | if (name_flags & 0x1| TRUE | evaluated 238 times by 1 test | | FALSE | evaluated 1562 times by 1 test |
) | 238-1562 |
| 54 | onoff ^= 1;executed 238 times by 1 test: onoff ^= 1; | 238 |
| 55 | switch (name_flags & 0xf00) { | - |
| 56 | | - |
| 57 | case never executed: case 0x100: 0x100:never executed: case 0x100: | 0 |
| 58 | pflags = cctx->pcert_flags; | - |
| 59 | break; never executed: break; | 0 |
| 60 | | - |
| 61 | caseexecuted 1262 times by 1 test: case 0x200: 0x200:executed 1262 times by 1 test: case 0x200: | 1262 |
| 62 | pflags = cctx->pvfy_flags; | - |
| 63 | break;executed 1262 times by 1 test: break; | 1262 |
| 64 | | - |
| 65 | caseexecuted 538 times by 1 test: case 0x000: 0x000:executed 538 times by 1 test: case 0x000: | 538 |
| 66 | pflags = cctx->poptions; | - |
| 67 | break;executed 538 times by 1 test: break; | 538 |
| 68 | | - |
| 69 | default never executed: default: :never executed: default: | 0 |
| 70 | return; never executed: return; | 0 |
| 71 | | - |
| 72 | } | - |
| 73 | if (onoff| TRUE | evaluated 1678 times by 1 test | | FALSE | evaluated 122 times by 1 test |
) | 122-1678 |
| 74 | *executed 1678 times by 1 test: *pflags |= option_value; pflags |= option_value;executed 1678 times by 1 test: *pflags |= option_value; | 1678 |
| 75 | else | - |
| 76 | *executed 122 times by 1 test: *pflags &= ~option_value; pflags &= ~option_value;executed 122 times by 1 test: *pflags &= ~option_value; | 122 |
| 77 | } | - |
| 78 | | - |
| 79 | static int ssl_match_option(SSL_CONF_CTX *cctx, const ssl_flag_tbl *tbl, | - |
| 80 | const char *name, int namelen, int onoff) | - |
| 81 | { | - |
| 82 | | - |
| 83 | if (!(cctx->flags & tbl->name_flags & (0x4|0x8))| TRUE | evaluated 79 times by 1 test | | FALSE | evaluated 1835 times by 1 test |
) | 79-1835 |
| 84 | returnexecuted 79 times by 1 test: return 0; 0;executed 79 times by 1 test: return 0; | 79 |
| 85 | if (namelen == -1| TRUE | never evaluated | | FALSE | evaluated 1835 times by 1 test |
) { | 0-1835 |
| 86 | if ( | - |
| 87 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 88 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 89 | ) && __builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 90 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 91 | ) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 92 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 93 | ), __s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 94 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 95 | ), (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 96 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 97 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 98 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 99 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 100 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 101 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 102 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 103 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 104 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 105 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 106 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 107 | ) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 108 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 109 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 110 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 111 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 112 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 113 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 114 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 115 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 116 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 117 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 118 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 119 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 120 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 121 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 122 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 123 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 124 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 125 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 126 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 127 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 128 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 129 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 130 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 131 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 132 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 133 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( tbl->name ))[3] - __s2[3]); | 0 |
| 134 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( tbl->name ))[3] - __s2[3]); | 0 |
| 135 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 136 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 137 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 138 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 139 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 140 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 141 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 142 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 143 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 144 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 145 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 146 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 147 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 148 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 149 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 150 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 151 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 152 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 153 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 154 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 155 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 156 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 157 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 158 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 159 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 160 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 161 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
| 162 | name| TRUE | never evaluated | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 |
| 163 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 164 | tbl->name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 165 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 166 | name| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 167 | )))); })| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 168 | ) | - |
| 169 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 170 | } never executed: end of block else if (tbl->namelen != namelen| TRUE | evaluated 271 times by 1 test | | FALSE | evaluated 1564 times by 1 test |
|| strncasecmp(tbl->name, name, namelen)| TRUE | evaluated 39 times by 1 test | | FALSE | evaluated 1525 times by 1 test |
) | 0-1564 |
| 171 | returnexecuted 310 times by 1 test: return 0; 0;executed 310 times by 1 test: return 0; | 310 |
| 172 | ssl_set_option(cctx, tbl->name_flags, tbl->option_value, onoff); | - |
| 173 | returnexecuted 1525 times by 1 test: return 1; 1;executed 1525 times by 1 test: return 1; | 1525 |
| 174 | } | - |
| 175 | | - |
| 176 | static int ssl_set_option_list(const char *elem, int len, void *usr) | - |
| 177 | { | - |
| 178 | SSL_CONF_CTX *cctx = usr; | - |
| 179 | size_t i; | - |
| 180 | const ssl_flag_tbl *tbl; | - |
| 181 | int onoff = 1; | - |
| 182 | | - |
| 183 | | - |
| 184 | | - |
| 185 | | - |
| 186 | if (elem == | TRUE | never evaluated | | FALSE | evaluated 1525 times by 1 test |
| 0-1525 |
| 187 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1525 times by 1 test |
| 0-1525 |
| 188 | ) | - |
| 189 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 190 | if (len != -1| TRUE | evaluated 1525 times by 1 test | | FALSE | never evaluated |
) { | 0-1525 |
| 191 | if (*| TRUE | never evaluated | | FALSE | evaluated 1525 times by 1 test |
elem == '+'| TRUE | never evaluated | | FALSE | evaluated 1525 times by 1 test |
) { | 0-1525 |
| 192 | elem++; | - |
| 193 | len--; | - |
| 194 | onoff = 1; | - |
| 195 | } never executed: end of block else if (*| TRUE | evaluated 116 times by 1 test | | FALSE | evaluated 1409 times by 1 test |
elem == '-'| TRUE | evaluated 116 times by 1 test | | FALSE | evaluated 1409 times by 1 test |
) { | 0-1409 |
| 196 | elem++; | - |
| 197 | len--; | - |
| 198 | onoff = 0; | - |
| 199 | }executed 116 times by 1 test: end of block | 116 |
| 200 | }executed 1525 times by 1 test: end of block | 1525 |
| 201 | for (i = 0, tbl = cctx->tbl; i < cctx->ntbl| TRUE | evaluated 1914 times by 1 test | | FALSE | never evaluated |
; i++, tbl++) { | 0-1914 |
| 202 | if (ssl_match_option(cctx, tbl, elem, len, onoff)| TRUE | evaluated 1525 times by 1 test | | FALSE | evaluated 389 times by 1 test |
) | 389-1525 |
| 203 | returnexecuted 1525 times by 1 test: return 1; 1;executed 1525 times by 1 test: return 1; | 1525 |
| 204 | }executed 389 times by 1 test: end of block | 389 |
| 205 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 206 | } | - |
| 207 | | - |
| 208 | | - |
| 209 | static int cmd_SignatureAlgorithms(SSL_CONF_CTX *cctx, const char *value) | - |
| 210 | { | - |
| 211 | int rv; | - |
| 212 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 35 times by 1 test |
) | 0-35 |
| 213 | rv = SSL_ctrl(cctx->ssl,98,0,(char *)(value)); never executed: rv = SSL_ctrl(cctx->ssl,98,0,(char *)(value)); | 0 |
| 214 | | - |
| 215 | else | - |
| 216 | rv = SSL_CTX_ctrl(cctx->ctx,98,0,(char *)(value));executed 35 times by 1 test: rv = SSL_CTX_ctrl(cctx->ctx,98,0,(char *)(value)); | 35 |
| 217 | returnexecuted 35 times by 1 test: return rv > 0; rv > 0;executed 35 times by 1 test: return rv > 0; | 35 |
| 218 | } | - |
| 219 | | - |
| 220 | | - |
| 221 | static int cmd_ClientSignatureAlgorithms(SSL_CONF_CTX *cctx, const char *value) | - |
| 222 | { | - |
| 223 | int rv; | - |
| 224 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 11 times by 1 test |
) | 0-11 |
| 225 | rv = SSL_ctrl(cctx->ssl,102,0,(char *)(value)); never executed: rv = SSL_ctrl(cctx->ssl,102,0,(char *)(value)); | 0 |
| 226 | | - |
| 227 | else | - |
| 228 | rv = SSL_CTX_ctrl(cctx->ctx,102,0,(char *)(value));executed 11 times by 1 test: rv = SSL_CTX_ctrl(cctx->ctx,102,0,(char *)(value)); | 11 |
| 229 | returnexecuted 11 times by 1 test: return rv > 0; rv > 0;executed 11 times by 1 test: return rv > 0; | 11 |
| 230 | } | - |
| 231 | | - |
| 232 | static int cmd_Groups(SSL_CONF_CTX *cctx, const char *value) | - |
| 233 | { | - |
| 234 | int rv; | - |
| 235 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 95 times by 1 test |
) | 0-95 |
| 236 | rv = SSL_ctrl(cctx->ssl,92,0,(char *)(value)); never executed: rv = SSL_ctrl(cctx->ssl,92,0,(char *)(value)); | 0 |
| 237 | | - |
| 238 | else | - |
| 239 | rv = SSL_CTX_ctrl(cctx->ctx,92,0,(char *)(value));executed 95 times by 1 test: rv = SSL_CTX_ctrl(cctx->ctx,92,0,(char *)(value)); | 95 |
| 240 | returnexecuted 95 times by 1 test: return rv > 0; rv > 0;executed 95 times by 1 test: return rv > 0; | 95 |
| 241 | } | - |
| 242 | | - |
| 243 | | - |
| 244 | static int cmd_Curves(SSL_CONF_CTX *cctx, const char *value) | - |
| 245 | { | - |
| 246 | returnexecuted 89 times by 1 test: return cmd_Groups(cctx, value); cmd_Groups(cctx, value);executed 89 times by 1 test: return cmd_Groups(cctx, value); | 89 |
| 247 | } | - |
| 248 | | - |
| 249 | | - |
| 250 | | - |
| 251 | static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value) | - |
| 252 | { | - |
| 253 | int rv = 1; | - |
| 254 | EC_KEY *ecdh; | - |
| 255 | int nid; | - |
| 256 | | - |
| 257 | | - |
| 258 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
cctx->flags & 0x2)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 259 | && (strcasecmp(value, "+automatic") == 0| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 260 | || strcasecmp(value, "automatic") == 0| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0 |
| 261 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 262 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
cctx->flags & 0x1)| TRUE | never evaluated | | FALSE | never evaluated |
&& | 0 |
| 263 | | - |
| 264 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 265 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 266 | ) && __builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 267 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 268 | ) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 269 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 270 | ), __s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 271 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 272 | ), (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 273 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 274 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 275 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 276 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 277 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 278 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 279 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 280 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 281 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 282 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 283 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 284 | ) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 285 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 286 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 287 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 288 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 289 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 290 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 291 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 292 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 293 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 294 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 295 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 296 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 297 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 298 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 299 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 300 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 301 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 302 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 303 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 304 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 305 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 306 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 307 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 308 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 309 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 310 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | 0 |
| 311 | value| TRUE | never evaluated | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | 0 |
| 312 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 313 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 314 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 315 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 316 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 317 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 318 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 319 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 320 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 321 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 322 | ) && ((size_t)(const void *)((| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 323 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 324 | ) + 1) - (size_t)(const void *)(| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 325 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 326 | ) == 1) ? __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 327 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 328 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 329 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 330 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 331 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 332 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 333 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 334 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 335 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 336 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 337 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 338 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "auto" ))[3] - __s2[3]); | 0 |
| 339 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( "auto" ))[3] - __s2[3]); | 0 |
| 340 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 341 | value| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 342 | , | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 343 | "auto"| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 344 | )))); }) | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 345 | == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 346 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 347 | | - |
| 348 | nid = EC_curve_nist2nid(value); | - |
| 349 | if (nid == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 350 | nid = OBJ_sn2nid(value); never executed: nid = OBJ_sn2nid(value); | 0 |
| 351 | if (nid == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 352 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 353 | ecdh = EC_KEY_new_by_curve_name(nid); | - |
| 354 | if (!ecdh| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 355 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 356 | if (cctx->ctx| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 357 | rv = SSL_CTX_ctrl(cctx->ctx,4,0,(char *)(ecdh)); never executed: rv = SSL_CTX_ctrl(cctx->ctx,4,0,(char *)(ecdh)); | 0 |
| 358 | else if (cctx->ssl| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 359 | rv = SSL_ctrl(cctx->ssl,4,0,(char *)(ecdh)); never executed: rv = SSL_ctrl(cctx->ssl,4,0,(char *)(ecdh)); | 0 |
| 360 | EC_KEY_free(ecdh); | - |
| 361 | | - |
| 362 | return never executed: return rv > 0; rv > 0;never executed: return rv > 0; | 0 |
| 363 | } | - |
| 364 | | - |
| 365 | static int cmd_CipherString(SSL_CONF_CTX *cctx, const char *value) | - |
| 366 | { | - |
| 367 | int rv = 1; | - |
| 368 | | - |
| 369 | if (cctx->ctx| TRUE | evaluated 2643 times by 1 test | | FALSE | evaluated 4 times by 1 test |
) | 4-2643 |
| 370 | rv = SSL_CTX_set_cipher_list(cctx->ctx, value);executed 2643 times by 1 test: rv = SSL_CTX_set_cipher_list(cctx->ctx, value); | 2643 |
| 371 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 2647 times by 1 test |
) | 0-2647 |
| 372 | rv = SSL_set_cipher_list(cctx->ssl, value); never executed: rv = SSL_set_cipher_list(cctx->ssl, value); | 0 |
| 373 | returnexecuted 2647 times by 1 test: return rv > 0; rv > 0;executed 2647 times by 1 test: return rv > 0; | 2647 |
| 374 | } | - |
| 375 | | - |
| 376 | static int cmd_Ciphersuites(SSL_CONF_CTX *cctx, const char *value) | - |
| 377 | { | - |
| 378 | int rv = 1; | - |
| 379 | | - |
| 380 | if (cctx->ctx| TRUE | evaluated 186 times by 1 test | | FALSE | never evaluated |
) | 0-186 |
| 381 | rv = SSL_CTX_set_ciphersuites(cctx->ctx, value);executed 186 times by 1 test: rv = SSL_CTX_set_ciphersuites(cctx->ctx, value); | 186 |
| 382 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 186 times by 1 test |
) | 0-186 |
| 383 | rv = SSL_set_ciphersuites(cctx->ssl, value); never executed: rv = SSL_set_ciphersuites(cctx->ssl, value); | 0 |
| 384 | returnexecuted 186 times by 1 test: return rv > 0; rv > 0;executed 186 times by 1 test: return rv > 0; | 186 |
| 385 | } | - |
| 386 | | - |
| 387 | static int cmd_Protocol(SSL_CONF_CTX *cctx, const char *value) | - |
| 388 | { | - |
| 389 | static const ssl_flag_tbl ssl_protocol_list[] = { | - |
| 390 | {"ALL", (int)(sizeof("ALL") - 1), 0x1|(0x4|0x8), (0x02000000U| 0x04000000U|0x10000000U|0x08000000U|0x20000000U)}, | - |
| 391 | {"SSLv2", (int)(sizeof("SSLv2") - 1), 0x1|(0x4|0x8), 0x0}, | - |
| 392 | {"SSLv3", (int)(sizeof("SSLv3") - 1), 0x1|(0x4|0x8), 0x02000000U}, | - |
| 393 | {"TLSv1", (int)(sizeof("TLSv1") - 1), 0x1|(0x4|0x8), 0x04000000U}, | - |
| 394 | {"TLSv1.1", (int)(sizeof("TLSv1.1") - 1), 0x1|(0x4|0x8), 0x10000000U}, | - |
| 395 | {"TLSv1.2", (int)(sizeof("TLSv1.2") - 1), 0x1|(0x4|0x8), 0x08000000U}, | - |
| 396 | {"TLSv1.3", (int)(sizeof("TLSv1.3") - 1), 0x1|(0x4|0x8), 0x20000000U}, | - |
| 397 | {"DTLSv1", (int)(sizeof("DTLSv1") - 1), 0x1|(0x4|0x8), 0x04000000U}, | - |
| 398 | {"DTLSv1.2", (int)(sizeof("DTLSv1.2") - 1), 0x1|(0x4|0x8), 0x08000000U} | - |
| 399 | }; | - |
| 400 | cctx->tbl = ssl_protocol_list; | - |
| 401 | cctx->ntbl = (sizeof(ssl_protocol_list)/sizeof((ssl_protocol_list)[0])); | - |
| 402 | return never executed: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx);never executed: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); | 0 |
| 403 | } | - |
| 404 | | - |
| 405 | | - |
| 406 | | - |
| 407 | | - |
| 408 | | - |
| 409 | | - |
| 410 | static int protocol_from_string(const char *value) | - |
| 411 | { | - |
| 412 | struct protocol_versions { | - |
| 413 | const char *name; | - |
| 414 | int version; | - |
| 415 | }; | - |
| 416 | static const struct protocol_versions versions[] = { | - |
| 417 | {"None", 0}, | - |
| 418 | {"SSLv3", 0x0300}, | - |
| 419 | {"TLSv1", 0x0301}, | - |
| 420 | {"TLSv1.1", 0x0302}, | - |
| 421 | {"TLSv1.2", 0x0303}, | - |
| 422 | {"TLSv1.3", 0x0304}, | - |
| 423 | {"DTLSv1", 0xFEFF}, | - |
| 424 | {"DTLSv1.2", 0xFEFD} | - |
| 425 | }; | - |
| 426 | size_t i; | - |
| 427 | size_t n = (sizeof(versions)/sizeof((versions)[0])); | - |
| 428 | | - |
| 429 | for (i = 0; i < n| TRUE | evaluated 15264 times by 1 test | | FALSE | never evaluated |
; i++) | 0-15264 |
| 430 | if ( | - |
| 431 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 432 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 433 | ) && __builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 434 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 435 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 436 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 437 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 438 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 439 | ), (!((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 440 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 441 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 442 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 443 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 444 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 445 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 446 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 447 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 448 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 449 | , | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 450 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 451 | ) : (__builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 452 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 453 | ) && ((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 454 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 455 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 456 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 457 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 458 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 459 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 460 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 461 | ) && ((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 462 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 463 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 464 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 465 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 466 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 467 | , | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 468 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 469 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 470 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 471 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 472 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 473 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 474 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 475 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 476 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 477 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( versions[i].name ))[3] - __s2[3]); | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 478 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( versions[i].name ))[3] - __s2[3]); | 0-11984 |
| 479 | ))[3] - __s2[3]);| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( versions[i].name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 480 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 481 | ) && ((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 482 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 483 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 484 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 485 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 486 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 487 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 488 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 489 | ) && ((size_t)(const void *)((| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 490 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 491 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 492 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 493 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 494 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 495 | , | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 496 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 497 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 498 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 499 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 500 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 501 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 502 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 503 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 504 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 505 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 506 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); | 0-11984 |
| 507 | ))[3] - __s2[3]);| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( value ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 0-11984 |
| 508 | versions[i].name| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 509 | , | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 510 | value| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 511 | )))); }) | TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
| 3280-11984 |
| 512 | == 0| TRUE | evaluated 3280 times by 1 test | | FALSE | evaluated 11984 times by 1 test |
) | 3280-11984 |
| 513 | returnexecuted 3280 times by 1 test: return versions[i].version; versions[i].version;executed 3280 times by 1 test: return versions[i].version; | 3280 |
| 514 | return never executed: return -1; -1;never executed: return -1; | 0 |
| 515 | } | - |
| 516 | | - |
| 517 | static int min_max_proto(SSL_CONF_CTX *cctx, const char *value, int *bound) | - |
| 518 | { | - |
| 519 | int method_version; | - |
| 520 | int new_version; | - |
| 521 | | - |
| 522 | if (cctx->ctx != | TRUE | evaluated 3280 times by 1 test | | FALSE | never evaluated |
| 0-3280 |
| 523 | ((void *)0)| TRUE | evaluated 3280 times by 1 test | | FALSE | never evaluated |
| 0-3280 |
| 524 | ) | - |
| 525 | method_version = cctx->ctx->method->version;executed 3280 times by 1 test: method_version = cctx->ctx->method->version; | 3280 |
| 526 | else if (cctx->ssl != | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 527 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 528 | ) | - |
| 529 | method_version = cctx->ssl->ctx->method->version; never executed: method_version = cctx->ssl->ctx->method->version; | 0 |
| 530 | else | - |
| 531 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 532 | if ((| TRUE | never evaluated | | FALSE | evaluated 3280 times by 1 test |
new_version = protocol_from_string(value)) < 0| TRUE | never evaluated | | FALSE | evaluated 3280 times by 1 test |
) | 0-3280 |
| 533 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 534 | returnexecuted 3280 times by 1 test: return ssl_set_version_bound(method_version, new_version, bound); ssl_set_version_bound(method_version, new_version, bound);executed 3280 times by 1 test: return ssl_set_version_bound(method_version, new_version, bound); | 3280 |
| 535 | } | - |
| 536 | static int cmd_MinProtocol(SSL_CONF_CTX *cctx, const char *value) | - |
| 537 | { | - |
| 538 | returnexecuted 1312 times by 1 test: return min_max_proto(cctx, value, cctx->min_version); min_max_proto(cctx, value, cctx->min_version);executed 1312 times by 1 test: return min_max_proto(cctx, value, cctx->min_version); | 1312 |
| 539 | } | - |
| 540 | static int cmd_MaxProtocol(SSL_CONF_CTX *cctx, const char *value) | - |
| 541 | { | - |
| 542 | returnexecuted 1968 times by 1 test: return min_max_proto(cctx, value, cctx->max_version); min_max_proto(cctx, value, cctx->max_version);executed 1968 times by 1 test: return min_max_proto(cctx, value, cctx->max_version); | 1968 |
| 543 | } | - |
| 544 | | - |
| 545 | static int cmd_Options(SSL_CONF_CTX *cctx, const char *value) | - |
| 546 | { | - |
| 547 | static const ssl_flag_tbl ssl_option_list[] = { | - |
| 548 | {"SessionTicket", (int)(sizeof("SessionTicket") - 1), 0x1|(0x4|0x8), 0x00004000U}, | - |
| 549 | {"EmptyFragments", (int)(sizeof("EmptyFragments") - 1), 0x1|(0x4|0x8), 0x00000800U} | - |
| 550 | , | - |
| 551 | {"Bugs", (int)(sizeof("Bugs") - 1), (0x4|0x8), (0x80000000U| 0x00000800U| 0x00000004U| 0x00000010U| 0x00000040U)}, | - |
| 552 | {"Compression", (int)(sizeof("Compression") - 1), 0x1|(0x4|0x8), 0x00020000U}, | - |
| 553 | {"ServerPreference", (int)(sizeof("ServerPreference") - 1), 0x8, 0x00400000U}, | - |
| 554 | {"NoResumptionOnRenegotiation", (int)(sizeof("NoResumptionOnRenegotiation") - 1), 0x8, 0x00010000U} | - |
| 555 | , | - |
| 556 | {"DHSingle", (int)(sizeof("DHSingle") - 1), 0x8, 0x0}, | - |
| 557 | {"ECDHSingle", (int)(sizeof("ECDHSingle") - 1), 0x8, 0x0}, | - |
| 558 | {"UnsafeLegacyRenegotiation", (int)(sizeof("UnsafeLegacyRenegotiation") - 1), (0x4|0x8), 0x00040000U} | - |
| 559 | , | - |
| 560 | {"EncryptThenMac", (int)(sizeof("EncryptThenMac") - 1), 0x1|(0x4|0x8), 0x00080000U}, | - |
| 561 | {"NoRenegotiation", (int)(sizeof("NoRenegotiation") - 1), (0x4|0x8), 0x40000000U}, | - |
| 562 | {"AllowNoDHEKEX", (int)(sizeof("AllowNoDHEKEX") - 1), (0x4|0x8), 0x00000400U}, | - |
| 563 | {"PrioritizeChaCha", (int)(sizeof("PrioritizeChaCha") - 1), (0x4|0x8), 0x00200000U}, | - |
| 564 | {"MiddleboxCompat", (int)(sizeof("MiddleboxCompat") - 1), (0x4|0x8), 0x00100000U}, | - |
| 565 | {"AntiReplay", (int)(sizeof("AntiReplay") - 1), 0x1|(0x4|0x8), 0x01000000U} | - |
| 566 | }; | - |
| 567 | if (value == | TRUE | never evaluated | | FALSE | evaluated 261 times by 1 test |
| 0-261 |
| 568 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 261 times by 1 test |
| 0-261 |
| 569 | ) | - |
| 570 | return never executed: return -3; -3;never executed: return -3; | 0 |
| 571 | cctx->tbl = ssl_option_list; | - |
| 572 | cctx->ntbl = (sizeof(ssl_option_list)/sizeof((ssl_option_list)[0])); | - |
| 573 | returnexecuted 261 times by 1 test: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx);executed 261 times by 1 test: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); | 261 |
| 574 | } | - |
| 575 | | - |
| 576 | static int cmd_VerifyMode(SSL_CONF_CTX *cctx, const char *value) | - |
| 577 | { | - |
| 578 | static const ssl_flag_tbl ssl_vfy_list[] = { | - |
| 579 | {"Peer", (int)(sizeof("Peer") - 1), 0x200 | 0x4, 0x01}, | - |
| 580 | {"Request", (int)(sizeof("Request") - 1), 0x200 | 0x8, 0x01}, | - |
| 581 | {"Require", (int)(sizeof("Require") - 1), 0x200 | 0x8, 0x01 | 0x02} | - |
| 582 | , | - |
| 583 | {"Once", (int)(sizeof("Once") - 1), 0x200 | 0x8, 0x01 | 0x04}, | - |
| 584 | {"RequestPostHandshake", (int)(sizeof("RequestPostHandshake") - 1), 0x200 | 0x8, 0x01 | 0x08} | - |
| 585 | , | - |
| 586 | {"RequirePostHandshake", (int)(sizeof("RequirePostHandshake") - 1), 0x200 | 0x8, 0x01 | 0x08 | 0x02} | - |
| 587 | | - |
| 588 | , | - |
| 589 | }; | - |
| 590 | if (value == | TRUE | never evaluated | | FALSE | evaluated 1262 times by 1 test |
| 0-1262 |
| 591 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1262 times by 1 test |
| 0-1262 |
| 592 | ) | - |
| 593 | return never executed: return -3; -3;never executed: return -3; | 0 |
| 594 | cctx->tbl = ssl_vfy_list; | - |
| 595 | cctx->ntbl = (sizeof(ssl_vfy_list)/sizeof((ssl_vfy_list)[0])); | - |
| 596 | returnexecuted 1262 times by 1 test: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx);executed 1262 times by 1 test: return CONF_parse_list(value, ',', 1, ssl_set_option_list, cctx); | 1262 |
| 597 | } | - |
| 598 | | - |
| 599 | static int cmd_Certificate(SSL_CONF_CTX *cctx, const char *value) | - |
| 600 | { | - |
| 601 | int rv = 1; | - |
| 602 | CERT *c = | - |
| 603 | ((void *)0) | - |
| 604 | ; | - |
| 605 | if (cctx->ctx| TRUE | evaluated 2111 times by 1 test | | FALSE | evaluated 430 times by 1 test |
) { | 430-2111 |
| 606 | rv = SSL_CTX_use_certificate_chain_file(cctx->ctx, value); | - |
| 607 | c = cctx->ctx->cert; | - |
| 608 | }executed 2111 times by 1 test: end of block | 2111 |
| 609 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 2541 times by 1 test |
) { | 0-2541 |
| 610 | rv = SSL_use_certificate_chain_file(cctx->ssl, value); | - |
| 611 | c = cctx->ssl->cert; | - |
| 612 | } never executed: end of block | 0 |
| 613 | if (rv > 0| TRUE | evaluated 2541 times by 1 test | | FALSE | never evaluated |
&& c| TRUE | evaluated 2111 times by 1 test | | FALSE | evaluated 430 times by 1 test |
&& cctx->flags & 0x40| TRUE | evaluated 2111 times by 1 test | | FALSE | never evaluated |
) { | 0-2541 |
| 614 | char **pfilename = &cctx->cert_filename[c->key - c->pkeys]; | - |
| 615 | CRYPTO_free(*pfilename, __FILE__, 431); | - |
| 616 | *pfilename = CRYPTO_strdup(value, __FILE__, 432); | - |
| 617 | if (!*pfilename| TRUE | never evaluated | | FALSE | evaluated 2111 times by 1 test |
) | 0-2111 |
| 618 | rv = 0; never executed: rv = 0; | 0 |
| 619 | }executed 2111 times by 1 test: end of block | 2111 |
| 620 | | - |
| 621 | returnexecuted 2541 times by 1 test: return rv > 0; rv > 0;executed 2541 times by 1 test: return rv > 0; | 2541 |
| 622 | } | - |
| 623 | | - |
| 624 | static int cmd_PrivateKey(SSL_CONF_CTX *cctx, const char *value) | - |
| 625 | { | - |
| 626 | int rv = 1; | - |
| 627 | if (!(cctx->flags & 0x20)| TRUE | never evaluated | | FALSE | evaluated 2539 times by 1 test |
) | 0-2539 |
| 628 | return never executed: return -2; -2;never executed: return -2; | 0 |
| 629 | if (cctx->ctx| TRUE | evaluated 2111 times by 1 test | | FALSE | evaluated 428 times by 1 test |
) | 428-2111 |
| 630 | rv = SSL_CTX_use_PrivateKey_file(cctx->ctx, value, 1);executed 2111 times by 1 test: rv = SSL_CTX_use_PrivateKey_file(cctx->ctx, value, 1); | 2111 |
| 631 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 2539 times by 1 test |
) | 0-2539 |
| 632 | rv = SSL_use_PrivateKey_file(cctx->ssl, value, 1); never executed: rv = SSL_use_PrivateKey_file(cctx->ssl, value, 1); | 0 |
| 633 | returnexecuted 2539 times by 1 test: return rv > 0; rv > 0;executed 2539 times by 1 test: return rv > 0; | 2539 |
| 634 | } | - |
| 635 | | - |
| 636 | static int cmd_ServerInfoFile(SSL_CONF_CTX *cctx, const char *value) | - |
| 637 | { | - |
| 638 | int rv = 1; | - |
| 639 | if (cctx->ctx| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 640 | rv = SSL_CTX_use_serverinfo_file(cctx->ctx, value); never executed: rv = SSL_CTX_use_serverinfo_file(cctx->ctx, value); | 0 |
| 641 | return never executed: return rv > 0; rv > 0;never executed: return rv > 0; | 0 |
| 642 | } | - |
| 643 | | - |
| 644 | static int do_store(SSL_CONF_CTX *cctx, | - |
| 645 | const char *CAfile, const char *CApath, int verify_store) | - |
| 646 | { | - |
| 647 | CERT *cert; | - |
| 648 | X509_STORE **st; | - |
| 649 | if (cctx->ctx| TRUE | evaluated 1239 times by 1 test | | FALSE | never evaluated |
) | 0-1239 |
| 650 | cert = cctx->ctx->cert;executed 1239 times by 1 test: cert = cctx->ctx->cert; | 1239 |
| 651 | else if (cctx->ssl| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 652 | cert = cctx->ssl->cert; never executed: cert = cctx->ssl->cert; | 0 |
| 653 | else | - |
| 654 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 655 | st = verify_store| TRUE | evaluated 1239 times by 1 test | | FALSE | never evaluated |
? &cert->verify_store : &cert->chain_store; | 0-1239 |
| 656 | if (*| TRUE | evaluated 1239 times by 1 test | | FALSE | never evaluated |
st == | TRUE | evaluated 1239 times by 1 test | | FALSE | never evaluated |
| 0-1239 |
| 657 | ((void *)0)| TRUE | evaluated 1239 times by 1 test | | FALSE | never evaluated |
| 0-1239 |
| 658 | ) { | - |
| 659 | *st = X509_STORE_new(); | - |
| 660 | if (*| TRUE | never evaluated | | FALSE | evaluated 1239 times by 1 test |
st == | TRUE | never evaluated | | FALSE | evaluated 1239 times by 1 test |
| 0-1239 |
| 661 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1239 times by 1 test |
| 0-1239 |
| 662 | ) | - |
| 663 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 664 | }executed 1239 times by 1 test: end of block | 1239 |
| 665 | returnexecuted 1239 times by 1 test: return X509_STORE_load_locations(*st, CAfile, CApath) > 0; X509_STORE_load_locations(*st, CAfile, CApath) > 0;executed 1239 times by 1 test: return X509_STORE_load_locations(*st, CAfile, CApath) > 0; | 1239 |
| 666 | } | - |
| 667 | | - |
| 668 | static int cmd_ChainCAPath(SSL_CONF_CTX *cctx, const char *value) | - |
| 669 | { | - |
| 670 | return never executed: return do_store(cctx, ((void *)0) , value, 0); do_store(cctx, never executed: return do_store(cctx, ((void *)0) , value, 0); | 0 |
| 671 | ((void *)0) never executed: return do_store(cctx, ((void *)0) , value, 0); | 0 |
| 672 | , value, 0); never executed: return do_store(cctx, ((void *)0) , value, 0); | 0 |
| 673 | } | - |
| 674 | | - |
| 675 | static int cmd_ChainCAFile(SSL_CONF_CTX *cctx, const char *value) | - |
| 676 | { | - |
| 677 | return never executed: return do_store(cctx, value, ((void *)0) , 0); do_store(cctx, value, never executed: return do_store(cctx, value, ((void *)0) , 0); | 0 |
| 678 | ((void *)0) never executed: return do_store(cctx, value, ((void *)0) , 0); | 0 |
| 679 | , 0); never executed: return do_store(cctx, value, ((void *)0) , 0); | 0 |
| 680 | } | - |
| 681 | | - |
| 682 | static int cmd_VerifyCAPath(SSL_CONF_CTX *cctx, const char *value) | - |
| 683 | { | - |
| 684 | return never executed: return do_store(cctx, ((void *)0) , value, 1); do_store(cctx, never executed: return do_store(cctx, ((void *)0) , value, 1); | 0 |
| 685 | ((void *)0) never executed: return do_store(cctx, ((void *)0) , value, 1); | 0 |
| 686 | , value, 1); never executed: return do_store(cctx, ((void *)0) , value, 1); | 0 |
| 687 | } | - |
| 688 | | - |
| 689 | static int cmd_VerifyCAFile(SSL_CONF_CTX *cctx, const char *value) | - |
| 690 | { | - |
| 691 | returnexecuted 1239 times by 1 test: return do_store(cctx, value, ((void *)0) , 1); do_store(cctx, value, executed 1239 times by 1 test: return do_store(cctx, value, ((void *)0) , 1); | 1239 |
| 692 | ((void *)0)executed 1239 times by 1 test: return do_store(cctx, value, ((void *)0) , 1); | 1239 |
| 693 | , 1);executed 1239 times by 1 test: return do_store(cctx, value, ((void *)0) , 1); | 1239 |
| 694 | } | - |
| 695 | | - |
| 696 | static int cmd_RequestCAFile(SSL_CONF_CTX *cctx, const char *value) | - |
| 697 | { | - |
| 698 | if (cctx->canames == | TRUE | evaluated 15 times by 1 test | | FALSE | never evaluated |
| 0-15 |
| 699 | ((void *)0)| TRUE | evaluated 15 times by 1 test | | FALSE | never evaluated |
| 0-15 |
| 700 | ) | - |
| 701 | cctx->canames = sk_X509_NAME_new_null();executed 15 times by 1 test: cctx->canames = sk_X509_NAME_new_null(); | 15 |
| 702 | if (cctx->canames == | TRUE | never evaluated | | FALSE | evaluated 15 times by 1 test |
| 0-15 |
| 703 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 15 times by 1 test |
| 0-15 |
| 704 | ) | - |
| 705 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 706 | returnexecuted 15 times by 1 test: return SSL_add_file_cert_subjects_to_stack(cctx->canames, value); SSL_add_file_cert_subjects_to_stack(cctx->canames, value);executed 15 times by 1 test: return SSL_add_file_cert_subjects_to_stack(cctx->canames, value); | 15 |
| 707 | } | - |
| 708 | | - |
| 709 | static int cmd_ClientCAFile(SSL_CONF_CTX *cctx, const char *value) | - |
| 710 | { | - |
| 711 | returnexecuted 8 times by 1 test: return cmd_RequestCAFile(cctx, value); cmd_RequestCAFile(cctx, value);executed 8 times by 1 test: return cmd_RequestCAFile(cctx, value); | 8 |
| 712 | } | - |
| 713 | | - |
| 714 | static int cmd_RequestCAPath(SSL_CONF_CTX *cctx, const char *value) | - |
| 715 | { | - |
| 716 | if (cctx->canames == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 717 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 718 | ) | - |
| 719 | cctx->canames = sk_X509_NAME_new_null(); never executed: cctx->canames = sk_X509_NAME_new_null(); | 0 |
| 720 | if (cctx->canames == | TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 721 | ((void *)0)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 722 | ) | - |
| 723 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 724 | return never executed: return SSL_add_dir_cert_subjects_to_stack(cctx->canames, value); SSL_add_dir_cert_subjects_to_stack(cctx->canames, value);never executed: return SSL_add_dir_cert_subjects_to_stack(cctx->canames, value); | 0 |
| 725 | } | - |
| 726 | | - |
| 727 | static int cmd_ClientCAPath(SSL_CONF_CTX *cctx, const char *value) | - |
| 728 | { | - |
| 729 | return never executed: return cmd_RequestCAPath(cctx, value); cmd_RequestCAPath(cctx, value);never executed: return cmd_RequestCAPath(cctx, value); | 0 |
| 730 | } | - |
| 731 | | - |
| 732 | | - |
| 733 | static int cmd_DHParameters(SSL_CONF_CTX *cctx, const char *value) | - |
| 734 | { | - |
| 735 | int rv = 0; | - |
| 736 | DH *dh = | - |
| 737 | ((void *)0) | - |
| 738 | ; | - |
| 739 | BIO *in = | - |
| 740 | ((void *)0) | - |
| 741 | ; | - |
| 742 | if (cctx->ctx| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
|| cctx->ssl| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0-1 |
| 743 | in = BIO_new(BIO_s_file()); | - |
| 744 | if (in == | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 745 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 746 | ) | - |
| 747 | goto never executed: goto end; end;never executed: goto end; | 0 |
| 748 | if ((| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
int)BIO_ctrl(in,108, 0x01|0x02,(char *)(value)) <= 0| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 749 | goto never executed: goto end; end;never executed: goto end; | 0 |
| 750 | dh = PEM_read_bio_DHparams(in, | - |
| 751 | ((void *)0) | - |
| 752 | , | - |
| 753 | ((void *)0) | - |
| 754 | , | - |
| 755 | ((void *)0) | - |
| 756 | ); | - |
| 757 | if (dh == | TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 758 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
| 0-1 |
| 759 | ) | - |
| 760 | goto never executed: goto end; end;never executed: goto end; | 0 |
| 761 | }executed 1 time by 1 test: end of block else | 1 |
| 762 | return never executed: return 1; 1;never executed: return 1; | 0 |
| 763 | if (cctx->ctx| TRUE | evaluated 1 time by 1 test | | FALSE | never evaluated |
) | 0-1 |
| 764 | rv = SSL_CTX_ctrl(cctx->ctx,3,0,(char *)(dh));executed 1 time by 1 test: rv = SSL_CTX_ctrl(cctx->ctx,3,0,(char *)(dh)); | 1 |
| 765 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 766 | rv = SSL_ctrl(cctx->ssl,3,0,(char *)(dh)); never executed: rv = SSL_ctrl(cctx->ssl,3,0,(char *)(dh)); | 0 |
| 767 | end:code before this statement executed 1 time by 1 test: end: | 1 |
| 768 | DH_free(dh); | - |
| 769 | BIO_free(in); | - |
| 770 | returnexecuted 1 time by 1 test: return rv > 0; rv > 0;executed 1 time by 1 test: return rv > 0; | 1 |
| 771 | } | - |
| 772 | | - |
| 773 | | - |
| 774 | static int cmd_RecordPadding(SSL_CONF_CTX *cctx, const char *value) | - |
| 775 | { | - |
| 776 | int rv = 0; | - |
| 777 | int block_size = atoi(value); | - |
| 778 | | - |
| 779 | | - |
| 780 | | - |
| 781 | | - |
| 782 | | - |
| 783 | if (block_size >= 0| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
) { | 0-2 |
| 784 | if (cctx->ctx| TRUE | evaluated 2 times by 1 test | | FALSE | never evaluated |
) | 0-2 |
| 785 | rv = SSL_CTX_set_block_padding(cctx->ctx, block_size);executed 2 times by 1 test: rv = SSL_CTX_set_block_padding(cctx->ctx, block_size); | 2 |
| 786 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 2 times by 1 test |
) | 0-2 |
| 787 | rv = SSL_set_block_padding(cctx->ssl, block_size); never executed: rv = SSL_set_block_padding(cctx->ssl, block_size); | 0 |
| 788 | }executed 2 times by 1 test: end of block | 2 |
| 789 | returnexecuted 2 times by 1 test: return rv; rv;executed 2 times by 1 test: return rv; | 2 |
| 790 | } | - |
| 791 | | - |
| 792 | | - |
| 793 | static int cmd_NumTickets(SSL_CONF_CTX *cctx, const char *value) | - |
| 794 | { | - |
| 795 | int rv = 0; | - |
| 796 | int num_tickets = atoi(value); | - |
| 797 | | - |
| 798 | if (num_tickets >= 0| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 799 | if (cctx->ctx| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 800 | rv = SSL_CTX_set_num_tickets(cctx->ctx, num_tickets); never executed: rv = SSL_CTX_set_num_tickets(cctx->ctx, num_tickets); | 0 |
| 801 | if (cctx->ssl| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 802 | rv = SSL_set_num_tickets(cctx->ssl, num_tickets); never executed: rv = SSL_set_num_tickets(cctx->ssl, num_tickets); | 0 |
| 803 | } never executed: end of block | 0 |
| 804 | return never executed: return rv; rv;never executed: return rv; | 0 |
| 805 | } | - |
| 806 | | - |
| 807 | typedef struct { | - |
| 808 | int (*cmd) (SSL_CONF_CTX *cctx, const char *value); | - |
| 809 | const char *str_file; | - |
| 810 | const char *str_cmdline; | - |
| 811 | unsigned short flags; | - |
| 812 | unsigned short value_type; | - |
| 813 | } ssl_conf_cmd_tbl; | - |
| 814 | static const ssl_conf_cmd_tbl ssl_conf_cmds[] = { | - |
| 815 | {0, | - |
| 816 | ((void *)0) | - |
| 817 | , "no_ssl3", 0, 0x4}, | - |
| 818 | {0, | - |
| 819 | ((void *)0) | - |
| 820 | , "no_tls1", 0, 0x4}, | - |
| 821 | {0, | - |
| 822 | ((void *)0) | - |
| 823 | , "no_tls1_1", 0, 0x4}, | - |
| 824 | {0, | - |
| 825 | ((void *)0) | - |
| 826 | , "no_tls1_2", 0, 0x4}, | - |
| 827 | {0, | - |
| 828 | ((void *)0) | - |
| 829 | , "no_tls1_3", 0, 0x4}, | - |
| 830 | {0, | - |
| 831 | ((void *)0) | - |
| 832 | , "bugs", 0, 0x4}, | - |
| 833 | {0, | - |
| 834 | ((void *)0) | - |
| 835 | , "no_comp", 0, 0x4}, | - |
| 836 | {0, | - |
| 837 | ((void *)0) | - |
| 838 | , "comp", 0, 0x4}, | - |
| 839 | {0, | - |
| 840 | ((void *)0) | - |
| 841 | , "ecdh_single", 0x8, 0x4}, | - |
| 842 | {0, | - |
| 843 | ((void *)0) | - |
| 844 | , "no_ticket", 0, 0x4}, | - |
| 845 | {0, | - |
| 846 | ((void *)0) | - |
| 847 | , "serverpref", 0x8, 0x4}, | - |
| 848 | {0, | - |
| 849 | ((void *)0) | - |
| 850 | , "legacy_renegotiation", 0, 0x4}, | - |
| 851 | {0, | - |
| 852 | ((void *)0) | - |
| 853 | , "legacy_server_connect", 0x8, 0x4}, | - |
| 854 | {0, | - |
| 855 | ((void *)0) | - |
| 856 | , "no_renegotiation", 0, 0x4}, | - |
| 857 | {0, | - |
| 858 | ((void *)0) | - |
| 859 | , "no_resumption_on_reneg", 0x8, 0x4}, | - |
| 860 | {0, | - |
| 861 | ((void *)0) | - |
| 862 | , "no_legacy_server_connect", 0x8, 0x4}, | - |
| 863 | {0, | - |
| 864 | ((void *)0) | - |
| 865 | , "allow_no_dhe_kex", 0, 0x4}, | - |
| 866 | {0, | - |
| 867 | ((void *)0) | - |
| 868 | , "prioritize_chacha", 0x8, 0x4}, | - |
| 869 | {0, | - |
| 870 | ((void *)0) | - |
| 871 | , "strict", 0, 0x4}, | - |
| 872 | {0, | - |
| 873 | ((void *)0) | - |
| 874 | , "no_middlebox", 0, 0x4}, | - |
| 875 | {0, | - |
| 876 | ((void *)0) | - |
| 877 | , "anti_replay", 0x8, 0x4}, | - |
| 878 | {0, | - |
| 879 | ((void *)0) | - |
| 880 | , "no_anti_replay", 0x8, 0x4}, | - |
| 881 | {cmd_SignatureAlgorithms, "SignatureAlgorithms", "sigalgs", 0, 0x1}, | - |
| 882 | {cmd_ClientSignatureAlgorithms, "ClientSignatureAlgorithms", "client_sigalgs", 0, 0x1}, | - |
| 883 | {cmd_Curves, "Curves", "curves", 0, 0x1}, | - |
| 884 | {cmd_Groups, "Groups", "groups", 0, 0x1}, | - |
| 885 | | - |
| 886 | {cmd_ECDHParameters, "ECDHParameters", "named_curve", 0x8, 0x1}, | - |
| 887 | | - |
| 888 | {cmd_CipherString, "CipherString", "cipher", 0, 0x1}, | - |
| 889 | {cmd_Ciphersuites, "Ciphersuites", "ciphersuites", 0, 0x1}, | - |
| 890 | {cmd_Protocol, "Protocol", | - |
| 891 | ((void *)0) | - |
| 892 | , 0, 0x1}, | - |
| 893 | {cmd_MinProtocol, "MinProtocol", "min_protocol", 0, 0x1}, | - |
| 894 | {cmd_MaxProtocol, "MaxProtocol", "max_protocol", 0, 0x1}, | - |
| 895 | {cmd_Options, "Options", | - |
| 896 | ((void *)0) | - |
| 897 | , 0, 0x1}, | - |
| 898 | {cmd_VerifyMode, "VerifyMode", | - |
| 899 | ((void *)0) | - |
| 900 | , 0, 0x1}, | - |
| 901 | {cmd_Certificate, "Certificate", "cert", 0x20, 0x2} | - |
| 902 | , | - |
| 903 | {cmd_PrivateKey, "PrivateKey", "key", 0x20, 0x2} | - |
| 904 | , | - |
| 905 | {cmd_ServerInfoFile, "ServerInfoFile", | - |
| 906 | ((void *)0) | - |
| 907 | , 0x8 | 0x20, 0x2} | - |
| 908 | | - |
| 909 | , | - |
| 910 | {cmd_ChainCAPath, "ChainCAPath", "chainCApath", 0x20, 0x3} | - |
| 911 | , | - |
| 912 | {cmd_ChainCAFile, "ChainCAFile", "chainCAfile", 0x20, 0x2} | - |
| 913 | , | - |
| 914 | {cmd_VerifyCAPath, "VerifyCAPath", "verifyCApath", 0x20, 0x3} | - |
| 915 | , | - |
| 916 | {cmd_VerifyCAFile, "VerifyCAFile", "verifyCAfile", 0x20, 0x2} | - |
| 917 | , | - |
| 918 | {cmd_RequestCAFile, "RequestCAFile", "requestCAFile", 0x20, 0x2} | - |
| 919 | , | - |
| 920 | {cmd_ClientCAFile, "ClientCAFile", | - |
| 921 | ((void *)0) | - |
| 922 | , 0x8 | 0x20, 0x2} | - |
| 923 | | - |
| 924 | , | - |
| 925 | {cmd_RequestCAPath, "RequestCAPath", | - |
| 926 | ((void *)0) | - |
| 927 | , 0x20, 0x3} | - |
| 928 | , | - |
| 929 | {cmd_ClientCAPath, "ClientCAPath", | - |
| 930 | ((void *)0) | - |
| 931 | , 0x8 | 0x20, 0x3} | - |
| 932 | | - |
| 933 | , | - |
| 934 | | - |
| 935 | {cmd_DHParameters, "DHParameters", "dhparam", 0x8 | 0x20, 0x2} | - |
| 936 | | - |
| 937 | , | - |
| 938 | | - |
| 939 | {cmd_RecordPadding, "RecordPadding", "record_padding", 0, 0x1}, | - |
| 940 | {cmd_NumTickets, "NumTickets", "num_tickets", 0x8, 0x1}, | - |
| 941 | }; | - |
| 942 | | - |
| 943 | | - |
| 944 | static const ssl_switch_tbl ssl_cmd_switches[] = { | - |
| 945 | {0x02000000U, 0}, | - |
| 946 | {0x04000000U, 0}, | - |
| 947 | {0x10000000U, 0}, | - |
| 948 | {0x08000000U, 0}, | - |
| 949 | {0x20000000U, 0}, | - |
| 950 | {(0x80000000U| 0x00000800U| 0x00000004U| 0x00000010U| 0x00000040U), 0}, | - |
| 951 | {0x00020000U, 0}, | - |
| 952 | {0x00020000U, 0x1}, | - |
| 953 | {0x0, 0}, | - |
| 954 | {0x00004000U, 0}, | - |
| 955 | {0x00400000U, 0}, | - |
| 956 | | - |
| 957 | {0x00040000U, 0}, | - |
| 958 | | - |
| 959 | {0x00000004U, 0}, | - |
| 960 | | - |
| 961 | {0x40000000U, 0}, | - |
| 962 | | - |
| 963 | {0x00010000U, 0}, | - |
| 964 | | - |
| 965 | {0x00000004U, 0x1}, | - |
| 966 | | - |
| 967 | {0x00000400U, 0}, | - |
| 968 | | - |
| 969 | {0x00200000U, 0}, | - |
| 970 | {0x00000001U, 0x100}, | - |
| 971 | | - |
| 972 | {0x00100000U, 0x1}, | - |
| 973 | | - |
| 974 | {0x01000000U, 0x1}, | - |
| 975 | | - |
| 976 | {0x01000000U, 0}, | - |
| 977 | }; | - |
| 978 | | - |
| 979 | static int ssl_conf_cmd_skip_prefix(SSL_CONF_CTX *cctx, const char **pcmd) | - |
| 980 | { | - |
| 981 | if (!pcmd| TRUE | never evaluated | | FALSE | evaluated 15637 times by 1 test |
|| !*pcmd| TRUE | never evaluated | | FALSE | evaluated 15637 times by 1 test |
) | 0-15637 |
| 982 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 983 | | - |
| 984 | if (cctx->prefix| TRUE | evaluated 3602 times by 1 test | | FALSE | evaluated 12035 times by 1 test |
) { | 3602-12035 |
| 985 | if (strlen(*pcmd) <= cctx->prefixlen| TRUE | never evaluated | | FALSE | evaluated 3602 times by 1 test |
) | 0-3602 |
| 986 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 987 | if (cctx->flags & 0x1| TRUE | evaluated 3602 times by 1 test | | FALSE | never evaluated |
&& | 0-3602 |
| 988 | | - |
| 989 | (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
__extension__ (__builtin_constant_p (| TRUE | never evaluated | | FALSE | evaluated 3602 times by 1 test |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-3602 |
| 990 | cctx->prefixlen| TRUE | never evaluated | | FALSE | evaluated 3602 times by 1 test |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-3602 |
| 991 | )| TRUE | never evaluated | | FALSE | evaluated 3602 times by 1 test |
&& ((__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-3602 |
| 992 | *pcmd| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 993 | )| TRUE | never evaluated | | FALSE | never evaluated |
&& strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 994 | *pcmd| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 995 | ) < ((size_t) (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 996 | cctx->prefixlen| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 997 | ))| TRUE | never evaluated | | FALSE | never evaluated |
) || (__builtin_constant_p (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 998 | cctx->prefix| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 999 | )| TRUE | never evaluated | | FALSE | never evaluated |
&& strlen (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1000 | cctx->prefix| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1001 | ) < ((size_t) (| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1002 | cctx->prefixlen| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1003 | ))| TRUE | never evaluated | | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1004 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1005 | ) && __builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1006 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1007 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1008 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1009 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1010 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1011 | ), (!((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1012 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1013 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1014 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1015 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1016 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1017 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1018 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1019 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1020 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1021 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1022 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1023 | ) : (__builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1024 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1025 | ) && ((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1026 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1027 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1028 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1029 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1030 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1031 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1032 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1033 | ) && ((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1034 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1035 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1036 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1037 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1038 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1039 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1040 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1041 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1042 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1043 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1044 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1045 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1046 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1047 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1048 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1049 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( *pcmd ))[3] - __s2[3]); | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1050 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( *pcmd ))[3] - __s2[3]); | 0-2350 |
| 1051 | ))[3] - __s2[3]);| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( *pcmd ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1052 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1053 | ) && ((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1054 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1055 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1056 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1057 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1058 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1059 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1060 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1061 | ) && ((size_t)(const void *)((| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1062 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1063 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1064 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1065 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1066 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1067 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1068 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1069 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1070 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1071 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1072 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1073 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1074 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1075 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1076 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1077 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( cctx->prefix ))[3] - __s2[3]); | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1078 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cctx->prefix ))[3] - __s2[3]); | 0-2350 |
| 1079 | ))[3] - __s2[3]);| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cctx->prefix ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 0-2350 |
| 1080 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1081 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1082 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1083 | )))); }) : strncmp (| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1084 | *pcmd| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1085 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1086 | cctx->prefix| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1087 | , | TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1088 | cctx->prefixlen| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1089 | )))| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 2350 times by 1 test |
| 1252-2350 |
| 1090 | ) | - |
| 1091 | returnexecuted 1252 times by 1 test: return 0; 0;executed 1252 times by 1 test: return 0; | 1252 |
| 1092 | if (cctx->flags & 0x2| TRUE | never evaluated | | FALSE | evaluated 2350 times by 1 test |
&& | 0-2350 |
| 1093 | strncasecmp(*pcmd, cctx->prefix, cctx->prefixlen)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1094 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1095 | *pcmd += cctx->prefixlen; | - |
| 1096 | }executed 2350 times by 1 test: end of block else if (cctx->flags & 0x1| TRUE | evaluated 1044 times by 1 test | | FALSE | evaluated 10991 times by 1 test |
) { | 1044-10991 |
| 1097 | if (**| TRUE | never evaluated | | FALSE | evaluated 1044 times by 1 test |
pcmd != '-'| TRUE | never evaluated | | FALSE | evaluated 1044 times by 1 test |
|| !(*pcmd)[1]| TRUE | never evaluated | | FALSE | evaluated 1044 times by 1 test |
) | 0-1044 |
| 1098 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1099 | *pcmd += 1; | - |
| 1100 | }executed 1044 times by 1 test: end of block | 1044 |
| 1101 | returnexecuted 14385 times by 1 test: return 1; 1;executed 14385 times by 1 test: return 1; | 14385 |
| 1102 | } | - |
| 1103 | | - |
| 1104 | | - |
| 1105 | static int ssl_conf_cmd_allowed(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl * t) | - |
| 1106 | { | - |
| 1107 | unsigned int tfl = t->flags; | - |
| 1108 | unsigned int cfl = cctx->flags; | - |
| 1109 | if ((| TRUE | evaluated 128150 times by 1 test | | FALSE | evaluated 343570 times by 1 test |
tfl & 0x8)| TRUE | evaluated 128150 times by 1 test | | FALSE | evaluated 343570 times by 1 test |
&& !(cfl & 0x8)| TRUE | evaluated 54724 times by 1 test | | FALSE | evaluated 73426 times by 1 test |
) | 54724-343570 |
| 1110 | returnexecuted 54724 times by 1 test: return 0; 0;executed 54724 times by 1 test: return 0; | 54724 |
| 1111 | if ((| TRUE | never evaluated | | FALSE | evaluated 416996 times by 1 test |
tfl & 0x4)| TRUE | never evaluated | | FALSE | evaluated 416996 times by 1 test |
&& !(cfl & 0x4)| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-416996 |
| 1112 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1113 | if ((| TRUE | evaluated 15235 times by 1 test | | FALSE | evaluated 401761 times by 1 test |
tfl & 0x20)| TRUE | evaluated 15235 times by 1 test | | FALSE | evaluated 401761 times by 1 test |
| 15235-401761 |
| 1114 | && !(cfl & 0x20)| TRUE | never evaluated | | FALSE | evaluated 15235 times by 1 test |
) | 0-15235 |
| 1115 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1116 | returnexecuted 416996 times by 1 test: return 1; 1;executed 416996 times by 1 test: return 1; | 416996 |
| 1117 | } | - |
| 1118 | | - |
| 1119 | static const ssl_conf_cmd_tbl *ssl_conf_cmd_lookup(SSL_CONF_CTX *cctx, | - |
| 1120 | const char *cmd) | - |
| 1121 | { | - |
| 1122 | const ssl_conf_cmd_tbl *t; | - |
| 1123 | size_t i; | - |
| 1124 | if (cmd == | TRUE | never evaluated | | FALSE | evaluated 14385 times by 1 test |
| 0-14385 |
| 1125 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 14385 times by 1 test |
| 0-14385 |
| 1126 | ) | - |
| 1127 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
| 1128 | ((void *)0) never executed: return ((void *)0) ; | 0 |
| 1129 | ; never executed: return ((void *)0) ; | 0 |
| 1130 | | - |
| 1131 | | - |
| 1132 | for (i = 0, t = ssl_conf_cmds; i < (sizeof(ssl_conf_cmds)/sizeof((ssl_conf_cmds)[0]))| TRUE | evaluated 471720 times by 1 test | | FALSE | never evaluated |
; i++, t++) { | 0-471720 |
| 1133 | if (ssl_conf_cmd_allowed(cctx, t)| TRUE | evaluated 416996 times by 1 test | | FALSE | evaluated 54724 times by 1 test |
) { | 54724-416996 |
| 1134 | if (cctx->flags & 0x1| TRUE | evaluated 102171 times by 1 test | | FALSE | evaluated 314825 times by 1 test |
) { | 102171-314825 |
| 1135 | if (t->str_cmdline| TRUE | evaluated 94778 times by 1 test | | FALSE | evaluated 7393 times by 1 test |
&& | 7393-94778 |
| 1136 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1137 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1138 | ) && __builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1139 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1140 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1141 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1142 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1143 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1144 | ), (!((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1145 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1146 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1147 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1148 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1149 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1150 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1151 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1152 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1153 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1154 | , | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1155 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1156 | ) : (__builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1157 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1158 | ) && ((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1159 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1160 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1161 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1162 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1163 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1164 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1165 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1166 | ) && ((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1167 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1168 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1169 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1170 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1171 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1172 | , | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1173 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1174 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1175 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1176 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1177 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1178 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1179 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1180 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1181 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1182 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( t->str_cmdline ))[3] - __s2[3]); | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1183 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( t->str_cmdline ))[3] - __s2[3]); | 0-91384 |
| 1184 | ))[3] - __s2[3]);| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( t->str_cmdline ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1185 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1186 | ) && ((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1187 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1188 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1189 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1190 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1191 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1192 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1193 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1194 | ) && ((size_t)(const void *)((| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1195 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1196 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1197 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1198 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1199 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1200 | , | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1201 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1202 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1203 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1204 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1205 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1206 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1207 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1208 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1209 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1210 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( cmd ))[3] - __s2[3]); | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1211 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cmd ))[3] - __s2[3]); | 0-91384 |
| 1212 | ))[3] - __s2[3]);| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cmd ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 0-91384 |
| 1213 | t->str_cmdline| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1214 | , | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1215 | cmd| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1216 | )))); }) | TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
| 3394-91384 |
| 1217 | == 0| TRUE | evaluated 3394 times by 1 test | | FALSE | evaluated 91384 times by 1 test |
) | 3394-91384 |
| 1218 | returnexecuted 3394 times by 1 test: return t; t;executed 3394 times by 1 test: return t; | 3394 |
| 1219 | }executed 98777 times by 1 test: end of block | 98777 |
| 1220 | if (cctx->flags & 0x2| TRUE | evaluated 314825 times by 1 test | | FALSE | evaluated 98777 times by 1 test |
) { | 98777-314825 |
| 1221 | if (t->str_file| TRUE | evaluated 115215 times by 1 test | | FALSE | evaluated 199610 times by 1 test |
&& strcasecmp(t->str_file, cmd) == 0| TRUE | evaluated 10991 times by 1 test | | FALSE | evaluated 104224 times by 1 test |
) | 10991-199610 |
| 1222 | returnexecuted 10991 times by 1 test: return t; t;executed 10991 times by 1 test: return t; | 10991 |
| 1223 | }executed 303834 times by 1 test: end of block | 303834 |
| 1224 | }executed 402611 times by 1 test: end of block | 402611 |
| 1225 | }executed 457335 times by 1 test: end of block | 457335 |
| 1226 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
| 1227 | ((void *)0) never executed: return ((void *)0) ; | 0 |
| 1228 | ; never executed: return ((void *)0) ; | 0 |
| 1229 | } | - |
| 1230 | | - |
| 1231 | static int ctrl_switch_option(SSL_CONF_CTX *cctx, const ssl_conf_cmd_tbl * cmd) | - |
| 1232 | { | - |
| 1233 | | - |
| 1234 | size_t idx = cmd - ssl_conf_cmds; | - |
| 1235 | const ssl_switch_tbl *scmd; | - |
| 1236 | | - |
| 1237 | if (idx >= (sizeof(ssl_cmd_switches)/sizeof((ssl_cmd_switches)[0]))| TRUE | never evaluated | | FALSE | evaluated 275 times by 1 test |
) | 0-275 |
| 1238 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1239 | | - |
| 1240 | scmd = ssl_cmd_switches + idx; | - |
| 1241 | ssl_set_option(cctx, scmd->name_flags, scmd->option_value, 1); | - |
| 1242 | returnexecuted 275 times by 1 test: return 1; 1;executed 275 times by 1 test: return 1; | 275 |
| 1243 | } | - |
| 1244 | | - |
| 1245 | int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value) | - |
| 1246 | { | - |
| 1247 | const ssl_conf_cmd_tbl *runcmd; | - |
| 1248 | if (cmd == | TRUE | never evaluated | | FALSE | evaluated 15637 times by 1 test |
| 0-15637 |
| 1249 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 15637 times by 1 test |
| 0-15637 |
| 1250 | ) { | - |
| 1251 | ERR_put_error(20,(334),(385),__FILE__,796); | - |
| 1252 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1253 | } | - |
| 1254 | | - |
| 1255 | if (!ssl_conf_cmd_skip_prefix(cctx, &cmd)| TRUE | evaluated 1252 times by 1 test | | FALSE | evaluated 14385 times by 1 test |
) | 1252-14385 |
| 1256 | returnexecuted 1252 times by 1 test: return -2; -2;executed 1252 times by 1 test: return -2; | 1252 |
| 1257 | | - |
| 1258 | runcmd = ssl_conf_cmd_lookup(cctx, cmd); | - |
| 1259 | | - |
| 1260 | if (runcmd| TRUE | evaluated 14385 times by 1 test | | FALSE | never evaluated |
) { | 0-14385 |
| 1261 | int rv; | - |
| 1262 | if (runcmd->value_type == 0x4| TRUE | evaluated 275 times by 1 test | | FALSE | evaluated 14110 times by 1 test |
) { | 275-14110 |
| 1263 | returnexecuted 275 times by 1 test: return ctrl_switch_option(cctx, runcmd); ctrl_switch_option(cctx, runcmd);executed 275 times by 1 test: return ctrl_switch_option(cctx, runcmd); | 275 |
| 1264 | } | - |
| 1265 | if (value == | TRUE | never evaluated | | FALSE | evaluated 14110 times by 1 test |
| 0-14110 |
| 1266 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 14110 times by 1 test |
| 0-14110 |
| 1267 | ) | - |
| 1268 | return never executed: return -3; -3;never executed: return -3; | 0 |
| 1269 | rv = runcmd->cmd(cctx, value); | - |
| 1270 | if (rv > 0| TRUE | evaluated 14110 times by 1 test | | FALSE | never evaluated |
) | 0-14110 |
| 1271 | returnexecuted 14110 times by 1 test: return 2; 2;executed 14110 times by 1 test: return 2; | 14110 |
| 1272 | if (rv == -2| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1273 | return never executed: return -2; -2;never executed: return -2; | 0 |
| 1274 | if (cctx->flags & 0x10| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 1275 | ERR_put_error(20,(334),(384),__FILE__,818); | - |
| 1276 | ERR_add_error_data(4, "cmd=", cmd, ", value=", value); | - |
| 1277 | } never executed: end of block | 0 |
| 1278 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1279 | } | - |
| 1280 | | - |
| 1281 | if (cctx->flags & 0x10| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 1282 | ERR_put_error(20,(334),(386),__FILE__,825); | - |
| 1283 | ERR_add_error_data(2, "cmd=", cmd); | - |
| 1284 | } never executed: end of block | 0 |
| 1285 | | - |
| 1286 | return never executed: return -2; -2;never executed: return -2; | 0 |
| 1287 | } | - |
| 1288 | | - |
| 1289 | int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv) | - |
| 1290 | { | - |
| 1291 | int rv; | - |
| 1292 | const char *arg = | - |
| 1293 | ((void *)0) | - |
| 1294 | , *argn; | - |
| 1295 | if (pargc| TRUE | evaluated 1488 times by 1 test | | FALSE | never evaluated |
&& *| TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
pargc == 0| TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
) | 0-1488 |
| 1296 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1297 | if (!pargc| TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
|| *| TRUE | evaluated 1488 times by 1 test | | FALSE | never evaluated |
pargc > 0| TRUE | evaluated 1488 times by 1 test | | FALSE | never evaluated |
) | 0-1488 |
| 1298 | arg = **pargv;executed 1488 times by 1 test: arg = **pargv; | 1488 |
| 1299 | if (arg == | TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
| 0-1488 |
| 1300 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
| 0-1488 |
| 1301 | ) | - |
| 1302 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1303 | if (!pargc| TRUE | never evaluated | | FALSE | evaluated 1488 times by 1 test |
|| *| TRUE | evaluated 1488 times by 1 test | | FALSE | never evaluated |
pargc > 1| TRUE | evaluated 1488 times by 1 test | | FALSE | never evaluated |
) | 0-1488 |
| 1304 | argn = (*pargv)[1];executed 1488 times by 1 test: argn = (*pargv)[1]; | 1488 |
| 1305 | else | - |
| 1306 | argn = never executed: argn = ((void *)0) ; | 0 |
| 1307 | ((void *)0) never executed: argn = ((void *)0) ; | 0 |
| 1308 | ; never executed: argn = ((void *)0) ; | 0 |
| 1309 | cctx->flags &= ~0x2; | - |
| 1310 | cctx->flags |= 0x1; | - |
| 1311 | rv = SSL_CONF_cmd(cctx, arg, argn); | - |
| 1312 | if (rv > 0| TRUE | evaluated 862 times by 1 test | | FALSE | evaluated 626 times by 1 test |
) { | 626-862 |
| 1313 | | - |
| 1314 | (*pargv) += rv; | - |
| 1315 | if (pargc| TRUE | evaluated 862 times by 1 test | | FALSE | never evaluated |
) | 0-862 |
| 1316 | (*executed 862 times by 1 test: (*pargc) -= rv; pargc) -= rv;executed 862 times by 1 test: (*pargc) -= rv; | 862 |
| 1317 | returnexecuted 862 times by 1 test: return rv; rv;executed 862 times by 1 test: return rv; | 862 |
| 1318 | } | - |
| 1319 | | - |
| 1320 | if (rv == -2| TRUE | evaluated 626 times by 1 test | | FALSE | never evaluated |
) | 0-626 |
| 1321 | returnexecuted 626 times by 1 test: return 0; 0;executed 626 times by 1 test: return 0; | 626 |
| 1322 | | - |
| 1323 | if (rv == 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1324 | return never executed: return -1; -1;never executed: return -1; | 0 |
| 1325 | return never executed: return rv; rv;never executed: return rv; | 0 |
| 1326 | } | - |
| 1327 | | - |
| 1328 | int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd) | - |
| 1329 | { | - |
| 1330 | if (ssl_conf_cmd_skip_prefix(cctx, &cmd)| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 1331 | const ssl_conf_cmd_tbl *runcmd; | - |
| 1332 | runcmd = ssl_conf_cmd_lookup(cctx, cmd); | - |
| 1333 | if (runcmd| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1334 | return never executed: return runcmd->value_type; runcmd->value_type;never executed: return runcmd->value_type; | 0 |
| 1335 | } never executed: end of block | 0 |
| 1336 | return never executed: return 0x0; 0x0;never executed: return 0x0; | 0 |
| 1337 | } | - |
| 1338 | | - |
| 1339 | SSL_CONF_CTX *SSL_CONF_CTX_new(void) | - |
| 1340 | { | - |
| 1341 | SSL_CONF_CTX *ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 878); | - |
| 1342 | | - |
| 1343 | returnexecuted 3182 times by 1 test: return ret; ret;executed 3182 times by 1 test: return ret; | 3182 |
| 1344 | } | - |
| 1345 | | - |
| 1346 | int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx) | - |
| 1347 | { | - |
| 1348 | | - |
| 1349 | size_t i; | - |
| 1350 | CERT *c = | - |
| 1351 | ((void *)0) | - |
| 1352 | ; | - |
| 1353 | if (cctx->ctx| TRUE | evaluated 3184 times by 1 test | | FALSE | never evaluated |
) | 0-3184 |
| 1354 | c = cctx->ctx->cert;executed 3184 times by 1 test: c = cctx->ctx->cert; | 3184 |
| 1355 | else if (cctx->ssl| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 1356 | c = cctx->ssl->cert; never executed: c = cctx->ssl->cert; | 0 |
| 1357 | if (c| TRUE | evaluated 3184 times by 1 test | | FALSE | never evaluated |
&& cctx->flags & 0x40| TRUE | evaluated 2810 times by 1 test | | FALSE | evaluated 374 times by 1 test |
) { | 0-3184 |
| 1358 | for (i = 0; i < 9| TRUE | evaluated 25290 times by 1 test | | FALSE | evaluated 2810 times by 1 test |
; i++) { | 2810-25290 |
| 1359 | const char *p = cctx->cert_filename[i]; | - |
| 1360 | | - |
| 1361 | | - |
| 1362 | | - |
| 1363 | if (p| TRUE | evaluated 2111 times by 1 test | | FALSE | evaluated 23179 times by 1 test |
&& !c->pkeys[i].privatekey| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 2107 times by 1 test |
) { | 4-23179 |
| 1364 | if (!cmd_PrivateKey(cctx, p)| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 test |
) | 0-4 |
| 1365 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1366 | }executed 4 times by 1 test: end of block | 4 |
| 1367 | }executed 25290 times by 1 test: end of block | 25290 |
| 1368 | }executed 2810 times by 1 test: end of block | 2810 |
| 1369 | if (cctx->canames| TRUE | evaluated 15 times by 1 test | | FALSE | evaluated 3169 times by 1 test |
) { | 15-3169 |
| 1370 | if (cctx->ssl| TRUE | never evaluated | | FALSE | evaluated 15 times by 1 test |
) | 0-15 |
| 1371 | SSL_set0_CA_list(cctx->ssl, cctx->canames); never executed: SSL_set0_CA_list(cctx->ssl, cctx->canames); | 0 |
| 1372 | else if (cctx->ctx| TRUE | evaluated 15 times by 1 test | | FALSE | never evaluated |
) | 0-15 |
| 1373 | SSL_CTX_set0_CA_list(cctx->ctx, cctx->canames);executed 15 times by 1 test: SSL_CTX_set0_CA_list(cctx->ctx, cctx->canames); | 15 |
| 1374 | else | - |
| 1375 | sk_X509_NAME_pop_free(cctx->canames, X509_NAME_free); never executed: sk_X509_NAME_pop_free(cctx->canames, X509_NAME_free); | 0 |
| 1376 | cctx->canames = | - |
| 1377 | ((void *)0) | - |
| 1378 | ; | - |
| 1379 | }executed 15 times by 1 test: end of block | 15 |
| 1380 | returnexecuted 3184 times by 1 test: return 1; 1;executed 3184 times by 1 test: return 1; | 3184 |
| 1381 | } | - |
| 1382 | | - |
| 1383 | void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx) | - |
| 1384 | { | - |
| 1385 | if (cctx| TRUE | evaluated 3182 times by 1 test | | FALSE | evaluated 8016 times by 2 testsEvaluated by:- libssl.so.1.1
- tls13encryptiontest
|
) { | 3182-8016 |
| 1386 | size_t i; | - |
| 1387 | for (i = 0; i < 9| TRUE | evaluated 28638 times by 1 test | | FALSE | evaluated 3182 times by 1 test |
; i++) | 3182-28638 |
| 1388 | CRYPTO_free(cctx->cert_filename[i], __FILE__, 921);executed 28638 times by 1 test: CRYPTO_free(cctx->cert_filename[i], __FILE__, 921); | 28638 |
| 1389 | CRYPTO_free(cctx->prefix, __FILE__, 922); | - |
| 1390 | sk_X509_NAME_pop_free(cctx->canames, X509_NAME_free); | - |
| 1391 | CRYPTO_free(cctx, __FILE__, 924); | - |
| 1392 | }executed 3182 times by 1 test: end of block | 3182 |
| 1393 | }executed 11198 times by 2 tests: end of blockExecuted by:- libssl.so.1.1
- tls13encryptiontest
| 11198 |
| 1394 | | - |
| 1395 | unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags) | - |
| 1396 | { | - |
| 1397 | cctx->flags |= flags; | - |
| 1398 | returnexecuted 3182 times by 1 test: return cctx->flags; cctx->flags;executed 3182 times by 1 test: return cctx->flags; | 3182 |
| 1399 | } | - |
| 1400 | | - |
| 1401 | unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, unsigned int flags) | - |
| 1402 | { | - |
| 1403 | cctx->flags &= ~flags; | - |
| 1404 | return never executed: return cctx->flags; cctx->flags;never executed: return cctx->flags; | 0 |
| 1405 | } | - |
| 1406 | | - |
| 1407 | int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre) | - |
| 1408 | { | - |
| 1409 | char *tmp = | - |
| 1410 | ((void *)0) | - |
| 1411 | ; | - |
| 1412 | if (pre| TRUE | evaluated 357 times by 1 test | | FALSE | never evaluated |
) { | 0-357 |
| 1413 | tmp = CRYPTO_strdup(pre, __FILE__, 944); | - |
| 1414 | if (tmp == | TRUE | never evaluated | | FALSE | evaluated 357 times by 1 test |
| 0-357 |
| 1415 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 357 times by 1 test |
| 0-357 |
| 1416 | ) | - |
| 1417 | return never executed: return 0; 0;never executed: return 0; | 0 |
| 1418 | }executed 357 times by 1 test: end of block | 357 |
| 1419 | CRYPTO_free(cctx->prefix, __FILE__, 948); | - |
| 1420 | cctx->prefix = tmp; | - |
| 1421 | if (tmp| TRUE | evaluated 357 times by 1 test | | FALSE | never evaluated |
) | 0-357 |
| 1422 | cctx->prefixlen = strlen(tmp);executed 357 times by 1 test: cctx->prefixlen = strlen(tmp); | 357 |
| 1423 | else | - |
| 1424 | cctx->prefixlen = 0; never executed: cctx->prefixlen = 0; | 0 |
| 1425 | returnexecuted 357 times by 1 test: return 1; 1;executed 357 times by 1 test: return 1; | 357 |
| 1426 | } | - |
| 1427 | | - |
| 1428 | void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl) | - |
| 1429 | { | - |
| 1430 | cctx->ssl = ssl; | - |
| 1431 | cctx->ctx = | - |
| 1432 | ((void *)0) | - |
| 1433 | ; | - |
| 1434 | if (ssl| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 1435 | cctx->poptions = &ssl->options; | - |
| 1436 | cctx->min_version = &ssl->min_proto_version; | - |
| 1437 | cctx->max_version = &ssl->max_proto_version; | - |
| 1438 | cctx->pcert_flags = &ssl->cert->cert_flags; | - |
| 1439 | cctx->pvfy_flags = &ssl->verify_mode; | - |
| 1440 | } never executed: end of block else { | 0 |
| 1441 | cctx->poptions = | - |
| 1442 | ((void *)0) | - |
| 1443 | ; | - |
| 1444 | cctx->min_version = | - |
| 1445 | ((void *)0) | - |
| 1446 | ; | - |
| 1447 | cctx->max_version = | - |
| 1448 | ((void *)0) | - |
| 1449 | ; | - |
| 1450 | cctx->pcert_flags = | - |
| 1451 | ((void *)0) | - |
| 1452 | ; | - |
| 1453 | cctx->pvfy_flags = | - |
| 1454 | ((void *)0) | - |
| 1455 | ; | - |
| 1456 | } never executed: end of block | 0 |
| 1457 | } | - |
| 1458 | | - |
| 1459 | void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx) | - |
| 1460 | { | - |
| 1461 | cctx->ctx = ctx; | - |
| 1462 | cctx->ssl = | - |
| 1463 | ((void *)0) | - |
| 1464 | ; | - |
| 1465 | if (ctx| TRUE | evaluated 3188 times by 1 test | | FALSE | never evaluated |
) { | 0-3188 |
| 1466 | cctx->poptions = &ctx->options; | - |
| 1467 | cctx->min_version = &ctx->min_proto_version; | - |
| 1468 | cctx->max_version = &ctx->max_proto_version; | - |
| 1469 | cctx->pcert_flags = &ctx->cert->cert_flags; | - |
| 1470 | cctx->pvfy_flags = &ctx->verify_mode; | - |
| 1471 | }executed 3188 times by 1 test: end of block else { | 3188 |
| 1472 | cctx->poptions = | - |
| 1473 | ((void *)0) | - |
| 1474 | ; | - |
| 1475 | cctx->min_version = | - |
| 1476 | ((void *)0) | - |
| 1477 | ; | - |
| 1478 | cctx->max_version = | - |
| 1479 | ((void *)0) | - |
| 1480 | ; | - |
| 1481 | cctx->pcert_flags = | - |
| 1482 | ((void *)0) | - |
| 1483 | ; | - |
| 1484 | cctx->pvfy_flags = | - |
| 1485 | ((void *)0) | - |
| 1486 | ; | - |
| 1487 | } never executed: end of block | 0 |
| 1488 | } | - |
| | |