| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/statem/extensions.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | static int final_renegotiate(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | static int init_server_name(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | static int final_server_name(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | static int final_ec_pt_formats(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | static int init_session_ticket(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | static int init_status_request(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | static int init_npn(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | static int init_alpn(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | static int final_alpn(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | static int init_sig_algs_cert(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | static int init_sig_algs(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | static int init_certificate_authorities(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | static EXT_RETURN tls_construct_certificate_authorities(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | static int tls_parse_certificate_authorities(SSL *s, PACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | static int init_srp(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | static int init_etm(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | static int init_ems(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | static int final_ems(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | static int init_psk_kex_modes(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | static int final_key_share(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | static int init_srtp(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | static int final_sig_algs(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | static int final_early_data(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | static int final_maxfragmentlen(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | static int init_post_handshake_auth(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | typedef struct extensions_definition_st { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | unsigned int type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | unsigned int context; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | int (*init)(SSL *s, unsigned int context); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | int (*parse_ctos)(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | int (*parse_stoc)(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | EXT_RETURN (*construct_stoc)(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | X509 *x, size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | EXT_RETURN (*construct_ctos)(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | X509 *x, size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | int (*final)(SSL *s, unsigned int context, int sent); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | } EXTENSION_DEFINITION; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | static const EXTENSION_DEFINITION ext_defs[] = { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 0xff01, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | | 0x0008 | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | , tls_parse_ctos_renegotiate, tls_parse_stoc_renegotiate, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | tls_construct_stoc_renegotiate, tls_construct_ctos_renegotiate, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | final_renegotiate | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 0, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | | 0x0400, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | init_server_name, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | tls_parse_ctos_server_name, tls_parse_stoc_server_name, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | tls_construct_stoc_server_name, tls_construct_ctos_server_name, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | final_server_name | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 1, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | | 0x0400, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | , tls_parse_ctos_maxfragmentlen, tls_parse_stoc_maxfragmentlen, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | tls_construct_stoc_maxfragmentlen, tls_construct_ctos_maxfragmentlen, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | final_maxfragmentlen | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 12, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0x0080 | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | init_srp, tls_parse_ctos_srp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | , tls_construct_ctos_srp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 11, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | , tls_parse_ctos_ec_pt_formats, tls_parse_stoc_ec_pt_formats, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | tls_construct_stoc_ec_pt_formats, tls_construct_ctos_ec_pt_formats, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | final_ec_pt_formats | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 10, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0x0080 | 0x0400 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | | 0x0100, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | , tls_parse_ctos_supported_groups, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | tls_construct_stoc_supported_groups, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | tls_construct_ctos_supported_groups, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 35, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | init_session_ticket, tls_parse_ctos_session_ticket, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | tls_parse_stoc_session_ticket, tls_construct_stoc_session_ticket, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | tls_construct_ctos_session_ticket, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 5, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | | 0x1000 | 0x4000, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | init_status_request, tls_parse_ctos_status_request, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | tls_parse_stoc_status_request, tls_construct_stoc_status_request, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | tls_construct_ctos_status_request, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 13172, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | init_npn, tls_parse_ctos_npn, tls_parse_stoc_npn, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | tls_construct_stoc_next_proto_neg, tls_construct_ctos_npn, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 16, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | | 0x0400, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | init_alpn, tls_parse_ctos_alpn, tls_parse_stoc_alpn, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | tls_construct_stoc_alpn, tls_construct_ctos_alpn, final_alpn | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 14, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | | 0x0400 | 0x0002, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | init_srtp, tls_parse_ctos_use_srtp, tls_parse_stoc_use_srtp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | tls_construct_stoc_use_srtp, tls_construct_ctos_use_srtp, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 22, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | init_etm, tls_parse_ctos_etm, tls_parse_stoc_etm, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | tls_construct_stoc_etm, tls_construct_ctos_etm, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 18, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | | 0x1000 | 0x4000, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | , tls_parse_stoc_sct, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | , tls_construct_ctos_sct, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 23, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0x0080 | 0x0100 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | init_ems, tls_parse_ctos_ems, tls_parse_stoc_ems, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | tls_construct_stoc_ems, tls_construct_ctos_ems, final_ems | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 50, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 0x0080 | 0x4000, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | init_sig_algs_cert, tls_parse_ctos_sig_algs_cert, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | tls_parse_ctos_sig_algs_cert, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | 49, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0x0080 | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | init_post_handshake_auth, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | tls_parse_ctos_post_handshake_auth, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | , tls_construct_ctos_post_handshake_auth, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 13, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0x0080 | 0x4000, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | init_sig_algs, tls_parse_ctos_sig_algs, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | tls_parse_ctos_sig_algs, tls_construct_ctos_sig_algs, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | tls_construct_ctos_sig_algs, final_sig_algs | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 43, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 0x0080 | 0x0200 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | | 0x0800 | 0x0004, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | , tls_parse_stoc_supported_versions, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | tls_construct_stoc_supported_versions, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | tls_construct_ctos_supported_versions, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 45, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0x0080 | 0x0004 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | init_psk_kex_modes, tls_parse_ctos_psk_kex_modes, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | tls_construct_ctos_psk_kex_modes, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | 51, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 0x0080 | 0x0200 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | | 0x0800 | 0x0004 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | , tls_parse_ctos_key_share, tls_parse_stoc_key_share, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | tls_construct_stoc_key_share, tls_construct_ctos_key_share, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | final_key_share | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 44, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0x0080 | 0x0800 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | | 0x0004 | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | , tls_parse_ctos_cookie, tls_parse_stoc_cookie, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | tls_construct_stoc_cookie, tls_construct_ctos_cookie, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | 0xfde8, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 0x0100 | 0x0010, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | , tls_construct_stoc_cryptopro_bug, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 42, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 0x0080 | 0x0400 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | | 0x2000 | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | , tls_parse_ctos_early_data, tls_parse_stoc_early_data, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | tls_construct_stoc_early_data, tls_construct_ctos_early_data, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | final_early_data | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 47, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0x0080 | 0x4000 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | init_certificate_authorities, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | tls_parse_certificate_authorities, tls_parse_certificate_authorities, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | tls_construct_certificate_authorities, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | tls_construct_certificate_authorities, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 21, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0x0080, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | , tls_construct_ctos_padding, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | }, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 41, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 0x0080 | 0x0200 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | | 0x0004 | 0x0020, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | , tls_parse_ctos_psk, tls_parse_stoc_psk, tls_construct_stoc_psk, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | tls_construct_ctos_psk, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | static int validate_context(SSL *s, unsigned int extctx, unsigned int thisctx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | if ((
| 13-43031 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | return executed 13 times by 1 test: 0;return 0;Executed by:
executed 13 times by 1 test: return 0;Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | if ((
| 2542-40489 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | if ((
| 0-2542 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | } executed 2542 times by 1 test: else if ((end of blockExecuted by:
| 2-40487 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | return executed 2 times by 1 test: 0;return 0;Executed by:
executed 2 times by 1 test: return 0;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | return executed 43029 times by 1 test: 1;return 1;Executed by:
executed 43029 times by 1 test: return 1;Executed by:
| 43029 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | int tls_validate_all_contexts(SSL *s, unsigned int thisctx, RAW_EXTENSION *exts) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | size_t i, num_exts, builtin_num = (sizeof(ext_defs)/sizeof((ext_defs)[0])), offset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | RAW_EXTENSION *thisext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | unsigned int context; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | ENDPOINT role = ENDPOINT_BOTH; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | if ((
| 0-3492 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | role = ENDPOINT_SERVER; never executed: role = ENDPOINT_SERVER; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | else if ((
| 636-2856 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | role = ENDPOINT_CLIENT; executed 2856 times by 1 test: role = ENDPOINT_CLIENT;Executed by:
| 2856 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | num_exts = builtin_num + s->cert->custext.meths_count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | for (thisext = exts, i = 0; i < num_exts
| 3489-90758 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | if (!thisext->present
| 9898-80860 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | continue; executed 80860 times by 1 test: continue;Executed by:
| 80860 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | if (i < builtin_num
| 14-9884 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | context = ext_defs[i].context; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | } executed 9884 times by 1 test: else {end of blockExecuted by:
| 9884 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | custom_ext_method *meth = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | meth = custom_ext_find(&s->cert->custext, role, thisext->type, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | &offset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | if (!((meth !=
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | ((void *)0)
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | ) != 0)
| 0-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | context = meth->context; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | } executed 14 times by 1 test: end of blockExecuted by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | if (!validate_context(s, context, thisctx)
| 3-9895 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | return executed 3 times by 1 test: 0;return 0;Executed by:
executed 3 times by 1 test: return 0;Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | } executed 9895 times by 1 test: end of blockExecuted by:
| 9895 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | return executed 3489 times by 1 test: 1;return 1;Executed by:
executed 3489 times by 1 test: return 1;Executed by:
| 3489 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | static int verify_extension(SSL *s, unsigned int context, unsigned int type, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | custom_ext_methods *meths, RAW_EXTENSION *rawexlist, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | RAW_EXTENSION **found) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | size_t i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | size_t builtin_num = (sizeof(ext_defs)/sizeof((ext_defs)[0])); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | const EXTENSION_DEFINITION *thisext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | for (i = 0, thisext = ext_defs; i < builtin_num
| 4344-466521 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | if (type == thisext->type
| 33107-433414 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | if (!validate_context(s, thisext->context, context)
| 12-33095 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | return executed 12 times by 1 test: 0;return 0;Executed by:
executed 12 times by 1 test: return 0;Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | *found = &rawexlist[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | return executed 33095 times by 1 test: 1;return 1;Executed by:
executed 33095 times by 1 test: return 1;Executed by:
| 33095 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | } executed 433414 times by 1 test: end of blockExecuted by:
| 433414 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | if (meths !=
| 0-4344 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | ((void *)0)
| 0-4344 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | size_t offset = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | ENDPOINT role = ENDPOINT_BOTH; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | custom_ext_method *meth = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | if ((
| 2133-2211 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | role = ENDPOINT_SERVER; executed 2133 times by 1 test: role = ENDPOINT_SERVER;Executed by:
| 2133 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | else if ((
| 1039-1172 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | role = ENDPOINT_CLIENT; executed 1039 times by 1 test: role = ENDPOINT_CLIENT;Executed by:
| 1039 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | meth = custom_ext_find(meths, role, type, &offset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | if (meth !=
| 39-4305 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | ((void *)0)
| 39-4305 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | if (!validate_context(s, meth->context, context)
| 0-39 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | *found = &rawexlist[offset + builtin_num]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | return executed 39 times by 1 test: 1;return 1;Executed by:
executed 39 times by 1 test: return 1;Executed by:
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | } executed 4305 times by 1 test: end of blockExecuted by:
| 4305 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | *found = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | return executed 4305 times by 1 test: 1;return 1;Executed by:
executed 4305 times by 1 test: return 1;Executed by:
| 4305 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | int extension_is_relevant(SSL *s, unsigned int extctx, unsigned int thisctx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | int is_tls13; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | if ((
| 1072-268271 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | is_tls13 = 1; executed 1072 times by 1 test: is_tls13 = 1;Executed by:
| 1072 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | is_tls13 = (!(s->method->ssl3_enc->enc_flags & 0x8)
executed 268271 times by 1 test: is_tls13 = (!(s->method->ssl3_enc->enc_flags & 0x8) && (s)->method->version >= 0x0304 && (s)->method->version != 0x10000);Executed by:
| 13357-268271 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | if (((
| 13357-255986 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | && (
| 1150-12207 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | || (s->version == 0x0300
| 0-268193 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | && (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | || (is_tls13
| 4091-243383 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | || (!is_tls13
| 20719-243383 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | && (
| 0-44868 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | || (s->server
| 11069-166286 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | || (s->hit
| 2-249020 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | return executed 16312 times by 1 test: 0;return 0;Executed by:
executed 16312 times by 1 test: return 0;Executed by:
| 16312 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | return executed 253031 times by 1 test: 1;return 1;Executed by:
executed 253031 times by 1 test: return 1;Executed by:
| 253031 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | RAW_EXTENSION **res, size_t *len, int init) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | PACKET extensions = *packet; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | size_t i = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | size_t num_exts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | custom_ext_methods *exts = &s->cert->custext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | RAW_EXTENSION *raw_extensions = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | const EXTENSION_DEFINITION *thisexd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | *res = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | if ((
| 3693-6709 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | custom_ext_init(&s->cert->custext); executed 3693 times by 1 test: custom_ext_init(&s->cert->custext);Executed by:
| 3693 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | num_exts = (sizeof(ext_defs)/sizeof((ext_defs)[0])) + (exts !=
| 0-10402 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | ((void *)0)
| 0-10402 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | ? exts->meths_count : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | raw_extensions = CRYPTO_zalloc(num_exts * sizeof(*raw_extensions), __FILE__, 571); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | if (raw_extensions ==
| 0-10402 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | ((void *)0)
| 0-10402 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | ossl_statem_fatal((s), (80), (435), ((1|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | 574 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | i = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | while (PACKET_remaining(&extensions) > 0
| 10333-37466 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | unsigned int type, idx; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | PACKET extension; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | RAW_EXTENSION *thisex; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | if (!PACKET_get_net_2(&extensions, &type)
| 4-37462 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | !PACKET_get_length_prefixed_2(&extensions, &extension)
| 11-37451 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | ossl_statem_fatal((s), (50), (435), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | 587 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | goto executed 15 times by 1 test: err;goto err;Executed by:
executed 15 times by 1 test: goto err;Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
| 12-37439 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | || (thisex !=
| 4305-33134 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | ((void *)0)
| 4305-33134 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | && thisex->present == 1
| 31-33103 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | || (type == 41
| 308-37100 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | && (
| 108-200 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | && PACKET_remaining(&extensions) != 0
| 2-198 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | ossl_statem_fatal((s), (47), (435), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | 601 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | goto executed 45 times by 1 test: err;goto err;Executed by:
executed 45 times by 1 test: goto err;Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | idx = thisex - raw_extensions; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | if (idx < (sizeof(ext_defs)/sizeof((ext_defs)[0]))
| 4344-33062 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | && (
| 11272-21790 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | | 0x4000
| 11272-21790 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | | 0x2000)) == 0
| 11272-21790 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | && type != 44
| 144-11128 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | && type != 0xff01
| 2775-8353 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | && type != 18
| 9-8344 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | && (
| 9-8335 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | ossl_statem_fatal((s), (110), (435), (217), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | 628 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | goto executed 9 times by 1 test: err;goto err;Executed by:
executed 9 times by 1 test: goto err;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | if (thisex !=
| 4305-33092 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | ((void *)0)
| 4305-33092 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | thisex->data = extension; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | thisex->present = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | thisex->type = type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | thisex->received_order = i++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | if (s->ext.debug_cb
| 0-33092 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | s->ext.debug_cb(s, !s->server, thisex->type, never executed: s->ext.debug_cb(s, !s->server, thisex->type, PACKET_data(&thisex->data), PACKET_remaining(&thisex->data), s->ext.debug_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | PACKET_data(&thisex->data), never executed: s->ext.debug_cb(s, !s->server, thisex->type, PACKET_data(&thisex->data), PACKET_remaining(&thisex->data), s->ext.debug_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | PACKET_remaining(&thisex->data), never executed: s->ext.debug_cb(s, !s->server, thisex->type, PACKET_data(&thisex->data), PACKET_remaining(&thisex->data), s->ext.debug_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | s->ext.debug_arg); never executed: s->ext.debug_cb(s, !s->server, thisex->type, PACKET_data(&thisex->data), PACKET_remaining(&thisex->data), s->ext.debug_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | } executed 33092 times by 1 test: end of blockExecuted by:
| 33092 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | } executed 37397 times by 1 test: end of blockExecuted by:
| 37397 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | if (init
| 100-10233 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | for (thisexd = ext_defs, i = 0; i < (sizeof(ext_defs)/sizeof((ext_defs)[0]))
| 10233-266058 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | i++, thisexd++) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | if (thisexd->init !=
| 122796-143262 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | ((void *)0)
| 122796-143262 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | && (
| 59113-84149 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | && extension_is_relevant(s, thisexd->context, context)
| 11101-73048 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | && !thisexd->init(s, context)
| 0-73048 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | } executed 266058 times by 1 test: end of blockExecuted by:
| 266058 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | } executed 10233 times by 1 test: end of blockExecuted by:
| 10233 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | *res = raw_extensions; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | if (len !=
| 3657-6676 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | ((void *)0)
| 3657-6676 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | * executed 3657 times by 1 test: len = num_exts;*len = num_exts;Executed by:
executed 3657 times by 1 test: *len = num_exts;Executed by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | return executed 10333 times by 1 test: 1;return 1;Executed by:
executed 10333 times by 1 test: return 1;Executed by:
| 10333 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | err: | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | CRYPTO_free(raw_extensions, __FILE__, 666); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | return executed 69 times by 1 test: 0;return 0;Executed by:
executed 69 times by 1 test: return 0;Executed by:
| 69 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | int tls_parse_extension(SSL *s, TLSEXT_INDEX idx, int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | RAW_EXTENSION *exts, X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | RAW_EXTENSION *currext = &exts[idx]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | int (*parser)(SSL *s, PACKET *pkt, unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | size_t chainidx) = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | if (!currext->present
| 34722-213464 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | return executed 213464 times by 1 test: 1;return 1;Executed by:
executed 213464 times by 1 test: return 1;Executed by:
| 213464 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | if (currext->parsed
| 5214-29508 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | return executed 5214 times by 1 test: 1;return 1;Executed by:
executed 5214 times by 1 test: return 1;Executed by:
| 5214 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | currext->parsed = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | if (idx < (sizeof(ext_defs)/sizeof((ext_defs)[0]))
| 39-29469 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | const EXTENSION_DEFINITION *extdef = &ext_defs[idx]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | if (!extension_is_relevant(s, extdef->context, context)
| 4249-25220 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | return executed 4249 times by 1 test: 1;return 1;Executed by:
executed 4249 times by 1 test: return 1;Executed by:
| 4249 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | parser = s->server
| 10732-14488 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | if (parser !=
| 294-24926 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | ((void *)0)
| 294-24926 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | return executed 24926 times by 1 test: parser(s, &currext->data, context, x, chainidx);return parser(s, &currext->data, context, x, chainidx);Executed by:
executed 24926 times by 1 test: return parser(s, &currext->data, context, x, chainidx);Executed by:
| 24926 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | } executed 294 times by 1 test: end of blockExecuted by:
| 294 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | return executed 333 times by 1 test: custom_ext_parse(s, context, currext->type,return custom_ext_parse(s, context, currext->type, PACKET_data(&currext->data), PACKET_remaining(&currext->data), x, chainidx);Executed by:
executed 333 times by 1 test: return custom_ext_parse(s, context, currext->type, PACKET_data(&currext->data), PACKET_remaining(&currext->data), x, chainidx);Executed by:
| 333 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | PACKET_data(&currext->data), executed 333 times by 1 test: return custom_ext_parse(s, context, currext->type, PACKET_data(&currext->data), PACKET_remaining(&currext->data), x, chainidx);Executed by:
| 333 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | PACKET_remaining(&currext->data), executed 333 times by 1 test: return custom_ext_parse(s, context, currext->type, PACKET_data(&currext->data), PACKET_remaining(&currext->data), x, chainidx);Executed by:
| 333 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | x, chainidx); executed 333 times by 1 test: return custom_ext_parse(s, context, currext->type, PACKET_data(&currext->data), PACKET_remaining(&currext->data), x, chainidx);Executed by:
| 333 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | int tls_parse_all_extensions(SSL *s, int context, RAW_EXTENSION *exts, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | size_t chainidx, int fin) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | size_t i, numexts = (sizeof(ext_defs)/sizeof((ext_defs)[0])); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | const EXTENSION_DEFINITION *thisexd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | numexts += s->cert->custext.meths_count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | for (i = 0; i < numexts
| 9001-238354 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | if (!tls_parse_extension(s, i, context, exts, x, chainidx)
| 379-237975 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | return executed 379 times by 1 test: 0;return 0;Executed by:
executed 379 times by 1 test: return 0;Executed by:
| 379 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | } executed 237975 times by 1 test: end of blockExecuted by:
| 237975 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | if (fin
| 100-8901 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | for (i = 0, thisexd = ext_defs; i < (sizeof(ext_defs)/sizeof((ext_defs)[0]))
| 8872-231175 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | i++, thisexd++) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | if (thisexd->final !=
| 80055-151120 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | ((void *)0)
| 80055-151120 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | && (
| 34049-46006 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | && !thisexd->final(s, context, exts[i].present)
| 29-45977 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | return executed 29 times by 1 test: 0;return 0;Executed by:
executed 29 times by 1 test: return 0;Executed by:
| 29 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | } executed 231146 times by 1 test: end of blockExecuted by:
| 231146 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | } executed 8872 times by 1 test: end of blockExecuted by:
| 8872 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | return executed 8972 times by 1 test: 1;return 1;Executed by:
executed 8972 times by 1 test: return 1;Executed by:
| 8972 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | int should_add_extension(SSL *s, unsigned int extctx, unsigned int thisctx, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | int max_version) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | if ((
| 109840-155678 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | return executed 109840 times by 1 test: 0;return 0;Executed by:
executed 109840 times by 1 test: return 0;Executed by:
| 109840 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | if (!extension_is_relevant(s, extctx, thisctx)
| 961-154717 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | || ((
| 37671-117046 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | && (
| 3872-33799 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | && ((
| 576-33223 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | return executed 7340 times by 1 test: 0;return 0;Executed by:
executed 7340 times by 1 test: return 0;Executed by:
| 7340 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | return executed 148338 times by 1 test: 1;return 1;Executed by:
executed 148338 times by 1 test: return 1;Executed by:
| 148338 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | int tls_construct_extensions(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | X509 *x, size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | size_t i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | int min_version, max_version = 0, reason; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | const EXTENSION_DEFINITION *thisexd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | if (!WPACKET_start_sub_packet_len__((pkt), 2)
| 0-10211 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | || ((
| 3762-6449 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | (0x0080 | 0x0100)) != 0
| 3762-6449 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | && !WPACKET_set_flags(pkt,
| 0-6449 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | 2)
| 0-6449 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | ossl_statem_fatal((s), (80), (447), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | 808 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | if ((
| 4939-5272 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | reason = ssl_get_min_max_version(s, &min_version, &max_version, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | if (reason != 0
| 0-4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | ossl_statem_fatal((s), (80), (447), (reason), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | 816 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | } executed 4939 times by 1 test: end of blockExecuted by:
| 4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | if ((
| 4939-5272 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | custom_ext_init(&s->cert->custext); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | } executed 4939 times by 1 test: end of blockExecuted by:
| 4939 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)
| 0-10211 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | for (i = 0, thisexd = ext_defs; i < (sizeof(ext_defs)/sizeof((ext_defs)[0]))
| 10204-265451 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | EXT_RETURN (*construct)(SSL *s, WPACKET *pkt, unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | X509 *x, size_t chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | EXT_RETURN ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | if (!should_add_extension(s, thisexd->context, context, max_version)
| 117171-148280 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | continue; executed 117171 times by 1 test: continue;Executed by:
| 117171 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | construct = s->server
| 32085-116195 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | : thisexd->construct_ctos; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | if (construct ==
| 7365-140915 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | ((void *)0)
| 7365-140915 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | continue; executed 7365 times by 1 test: continue;Executed by:
| 7365 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | ret = construct(s, pkt, context, x, chainidx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | if (ret == EXT_RETURN_FAIL
| 7-140908 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | return executed 7 times by 1 test: 0;return 0;Executed by:
executed 7 times by 1 test: return 0;Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | if (ret == EXT_RETURN_SENT
| 52570-88338 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | && (
| 7724-44846 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | | 0x4000
| 7724-44846 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | | 0x2000)) != 0
| 7724-44846 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | s->ext.extflags[i] |= 0x2; executed 44846 times by 1 test: s->ext.extflags[i] |= 0x2;Executed by:
| 44846 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | } executed 140908 times by 1 test: end of blockExecuted by:
| 140908 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | if (!WPACKET_close(pkt)
| 0-10204 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | ossl_statem_fatal((s), (80), (447), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | 860 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | return executed 10204 times by 1 test: 1;return 1;Executed by:
executed 10204 times by 1 test: return 1;Executed by:
| 10204 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | static int final_renegotiate(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | if (!s->server
| 2745-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | if (!(s->options & 0x00000004U)
| 0-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | && !(s->options & 0x00040000U)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | && !sent
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | ossl_statem_fatal((s), (40), (483), (338), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 903 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 905 | 885 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 909 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 910 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | return executed 2787 times by 1 test: 1;return 1;Executed by:
executed 2787 times by 1 test: return 1;Executed by:
| 2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 912 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | if (s->renegotiate
| 22-2723 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | && !(s->options & 0x00040000U)
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | && !sent
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | ossl_statem_fatal((s), (40), (483), (338), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 920 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 921 | 897 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 922 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 923 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 924 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 925 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 926 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 927 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 928 | return executed 2745 times by 1 test: 1;return 1;Executed by:
executed 2745 times by 1 test: return 1;Executed by:
| 2745 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 929 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 930 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 931 | static int init_server_name(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 932 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 933 | if (s->server
| 3657-4401 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 934 | s->servername_done = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 936 | CRYPTO_free(s->ext.hostname, __FILE__, 910); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 937 | s->ext.hostname = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 938 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 939 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 940 | } executed 3657 times by 1 test: end of blockExecuted by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 942 | return executed 8058 times by 1 test: 1;return 1;Executed by:
executed 8058 times by 1 test: return 1;Executed by:
| 8058 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 943 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 944 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 945 | static int final_server_name(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 946 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 947 | int ret = 3; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 948 | int altmp = 112; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 949 | int was_ticket = (SSL_get_options(s) & 0x00004000U) == 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 950 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 951 | if (!((s->ctx !=
| 0-6116 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 952 | ((void *)0)
| 0-6116 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 953 | ) != 0)
| 0-6116 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 954 | ((void *)0)
| 0-6116 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 955 | ) != 0)
| 0-6116 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 956 | ossl_statem_fatal((s), (80), (558), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 957 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 958 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 959 | 925 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 960 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 961 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 962 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 963 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 964 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 965 | if (s->ctx->ext.servername_cb !=
| 176-5940 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 966 | ((void *)0)
| 176-5940 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 967 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 968 | ret = s->ctx->ext.servername_cb(s, &altmp, executed 176 times by 1 test: ret = s->ctx->ext.servername_cb(s, &altmp, s->ctx->ext.servername_arg);Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 969 | s->ctx->ext.servername_arg); executed 176 times by 1 test: ret = s->ctx->ext.servername_cb(s, &altmp, s->ctx->ext.servername_arg);Executed by:
| 176 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 970 | else if (s->session_ctx->ext.servername_cb !=
| 0-5940 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 971 | ((void *)0)
| 0-5940 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 972 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 973 | ret = s->session_ctx->ext.servername_cb(s, &altmp, never executed: ret = s->session_ctx->ext.servername_cb(s, &altmp, s->session_ctx->ext.servername_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 974 | s->session_ctx->ext.servername_arg); never executed: ret = s->session_ctx->ext.servername_cb(s, &altmp, s->session_ctx->ext.servername_arg); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 975 | if (s->server
| 2745-3371 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 976 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 977 | if (sent
| 0-2283 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 978 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 979 | CRYPTO_free(s->session->ext.hostname, __FILE__, 948); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 980 | s->session->ext.hostname = CRYPTO_strdup(s->ext.hostname, __FILE__, 949); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 981 | if (s->session->ext.hostname ==
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 982 | ((void *)0)
| 0-32 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 983 | && s->ext.hostname !=
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 984 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 985 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 986 | ossl_statem_fatal((s), (80), (558), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 987 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 988 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 989 | 952 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 990 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 991 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 992 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 993 | } executed 32 times by 1 test: end of blockExecuted by:
| 32 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 994 | } executed 2745 times by 1 test: end of blockExecuted by:
| 2745 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 995 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 996 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 997 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 998 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1000 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1001 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1002 | if (((
| 0-6072 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1004 | __atomic_fetch_add (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1005 | (&s->ctx->stats.sess_accept) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1006 | ), ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1007 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1008 | ), ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1009 | memory_order_relaxed | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1010 | )) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1011 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1013 | __atomic_fetch_add (( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1014 | (&s->session_ctx->stats.sess_accept) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1015 | ), ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1016 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1017 | ), ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1018 | memory_order_relaxed | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1019 | )) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1020 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1021 | } executed 23 times by 1 test: end of blockExecuted by:
| 23 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1022 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1025 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1026 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1028 | if (ret == 0
| 78-5944 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1029 | && was_ticket
| 0-94 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1030 | s->ext.ticket_expected = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1031 | if (!s->hit
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1032 | SSL_SESSION* ss = SSL_get_session(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1034 | if (ss !=
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1035 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1036 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1037 | CRYPTO_free(ss->ext.tick, __FILE__, 980); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1038 | ss->ext.tick = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1039 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1040 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1041 | ss->ext.ticklen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1042 | ss->ext.tick_lifetime_hint = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1043 | ss->ext.tick_age_add = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1044 | ss->ext.tick_identity = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1045 | if (!ssl_generate_session_id(s, ss)
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1046 | ossl_statem_fatal((s), (80), (558), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1047 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1048 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1049 | 988 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1050 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1051 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1052 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1053 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1054 | } executed 1 time by 1 test: else {end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1055 | ossl_statem_fatal((s), (80), (558), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1056 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1057 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1058 | 993 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1059 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1060 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1061 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1062 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1063 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1064 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1065 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1066 | switch (ret) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1067 | case executed 1 time by 1 test: 2:case 2:Executed by:
executed 1 time by 1 test: case 2:Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1068 | ossl_statem_fatal((s), (altmp), (558), (234), __FILE__, 1001); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1069 | return executed 1 time by 1 test: 0;return 0;Executed by:
executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1070 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1071 | case never executed: 1:case 1:never executed: case 1: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1072 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1073 | if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1074 | ssl3_send_alert(s, 1, altmp); never executed: ssl3_send_alert(s, 1, altmp); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1075 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1076 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1077 | case executed 5943 times by 1 test: 3:case 3:Executed by:
executed 5943 times by 1 test: case 3:Executed by:
| 5943 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1078 | s->servername_done = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1079 | return executed 5943 times by 1 test: 1;return 1;Executed by:
executed 5943 times by 1 test: return 1;Executed by:
| 5943 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1080 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1081 | default executed 172 times by 1 test: :default:Executed by:
executed 172 times by 1 test: default:Executed by:
| 172 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1082 | return executed 172 times by 1 test: 1;return 1;Executed by:
executed 172 times by 1 test: return 1;Executed by:
| 172 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1083 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1084 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1085 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1086 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1087 | static int final_ec_pt_formats(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1088 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1089 | unsigned long alg_k, alg_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1090 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1091 | if (s->server
| 2744-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1092 | return executed 2744 times by 1 test: 1;return 1;Executed by:
executed 2744 times by 1 test: return 1;Executed by:
| 2744 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1093 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1094 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1095 | alg_a = s->s3->tmp.new_cipher->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1096 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1097 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1098 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1099 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1100 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1102 | if (s->ext.ecpointformats !=
| 0-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1103 | ((void *)0)
| 0-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1104 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1105 | && s->ext.ecpointformats_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1106 | && s->session->ext.ecpointformats !=
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1107 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1109 | && s->session->ext.ecpointformats_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1110 | && ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1111 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1112 | size_t i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1113 | unsigned char *list = s->session->ext.ecpointformats; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1114 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1115 | for (i = 0; i < s->session->ext.ecpointformats_len
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1116 | if (*
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1117 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1118 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1119 | if (i == s->session->ext.ecpointformats_len
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1120 | ossl_statem_fatal((s), (47), (485), (157), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1121 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1122 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1123 | 1050 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1124 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1125 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1126 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1127 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1128 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1130 | return executed 2787 times by 1 test: 1;return 1;Executed by:
executed 2787 times by 1 test: return 1;Executed by:
| 2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1131 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1134 | static int init_session_ticket(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1135 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1136 | if (!s->server
| 3592-3816 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1137 | s->ext.ticket_expected = 0; executed 3816 times by 1 test: s->ext.ticket_expected = 0;Executed by:
| 3816 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1138 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1139 | return executed 7408 times by 1 test: 1;return 1;Executed by:
executed 7408 times by 1 test: return 1;Executed by:
| 7408 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1140 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1141 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1142 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1143 | static int init_status_request(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1144 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1145 | if (s->server
| 3675-4337 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1146 | s->ext.status_type = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1147 | } executed 3675 times by 1 test: else {end of blockExecuted by:
| 3675 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1152 | CRYPTO_free(s->ext.ocsp.resp, __FILE__, 1077); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1153 | s->ext.ocsp.resp = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1154 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1155 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1156 | s->ext.ocsp.resp_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1157 | } executed 4337 times by 1 test: end of blockExecuted by:
| 4337 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1158 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1159 | return executed 8012 times by 1 test: 1;return 1;Executed by:
executed 8012 times by 1 test: return 1;Executed by:
| 8012 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1160 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1164 | static int init_npn(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1165 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1166 | s->s3->npn_seen = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1168 | return executed 7408 times by 1 test: 1;return 1;Executed by:
executed 7408 times by 1 test: return 1;Executed by:
| 7408 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1169 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1170 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1171 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1172 | static int init_alpn(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1173 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1174 | CRYPTO_free(s->s3->alpn_selected, __FILE__, 1097); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1175 | s->s3->alpn_selected = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1176 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1177 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1178 | s->s3->alpn_selected_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1179 | if (s->server
| 3657-4401 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1180 | CRYPTO_free(s->s3->alpn_proposed, __FILE__, 1101); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1181 | s->s3->alpn_proposed = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1182 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1183 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1184 | s->s3->alpn_proposed_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1185 | } executed 3657 times by 1 test: end of blockExecuted by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1186 | return executed 8058 times by 1 test: 1;return 1;Executed by:
executed 8058 times by 1 test: return 1;Executed by:
| 8058 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1187 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1188 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1189 | static int final_alpn(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1190 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1191 | if (!s->server
| 4-3371 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1192 | ((void *)0)
| 4-3346 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1193 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1194 | s->ext.early_data_ok = 0; executed 4 times by 1 test: s->ext.early_data_ok = 0;Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1196 | if (!s->server
| 0-3371 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1197 | return executed 5090 times by 1 test: 1;return 1;Executed by:
executed 5090 times by 1 test: return 1;Executed by:
| 5090 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1198 | return executed 1025 times by 1 test: tls_handle_alpn(s);return tls_handle_alpn(s);Executed by:
executed 1025 times by 1 test: return tls_handle_alpn(s);Executed by:
| 1025 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1199 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1200 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1201 | static int init_sig_algs(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1202 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1203 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1204 | CRYPTO_free(s->s3->tmp.peer_sigalgs, __FILE__, 1131); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1205 | s->s3->tmp.peer_sigalgs = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1206 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1207 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1209 | return executed 3700 times by 1 test: 1;return 1;Executed by:
executed 3700 times by 1 test: return 1;Executed by:
| 3700 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1210 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1211 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1212 | static int init_sig_algs_cert(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1213 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1215 | CRYPTO_free(s->s3->tmp.peer_cert_sigalgs, __FILE__, 1140); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1216 | s->s3->tmp.peer_cert_sigalgs = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1217 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1218 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1220 | return executed 3700 times by 1 test: 1;return 1;Executed by:
executed 3700 times by 1 test: return 1;Executed by:
| 3700 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1221 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1222 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1223 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1224 | static int init_srp(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1225 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1226 | CRYPTO_free(s->srp_ctx.login, __FILE__, 1149); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1227 | s->srp_ctx.login = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1228 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1229 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1230 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1231 | return executed 3592 times by 1 test: 1;return 1;Executed by:
executed 3592 times by 1 test: return 1;Executed by:
| 3592 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1232 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1234 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1235 | static int init_etm(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1236 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1237 | s->ext.use_etm = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1238 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1239 | return executed 7408 times by 1 test: 1;return 1;Executed by:
executed 7408 times by 1 test: return 1;Executed by:
| 7408 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1240 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1241 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1242 | static int init_ems(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1243 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1244 | if (!s->server
| 3592-3816 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1245 | s->s3->flags &= ~0x0200; executed 3816 times by 1 test: s->s3->flags &= ~0x0200;Executed by:
| 3816 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1247 | return executed 7408 times by 1 test: 1;return 1;Executed by:
executed 7408 times by 1 test: return 1;Executed by:
| 7408 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1248 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1249 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1250 | static int final_ems(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1251 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1252 | if (!s->server
| 65-2787 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1254 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1255 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1257 | if (!(s->s3->flags & 0x0200) !=
| 2-63 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1258 | !(s->session->flags & 0x1)
| 2-63 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1259 | ossl_statem_fatal((s), (40), (486), (104), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1260 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1261 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1262 | 1181 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1263 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1264 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1265 | return executed 2 times by 1 test: 0;return 0;Executed by:
executed 2 times by 1 test: return 0;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1266 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1267 | } executed 63 times by 1 test: end of blockExecuted by:
| 63 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1269 | return executed 5527 times by 1 test: 1;return 1;Executed by:
executed 5527 times by 1 test: return 1;Executed by:
| 5527 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1270 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1272 | static int init_certificate_authorities(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1273 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1274 | sk_X509_NAME_pop_free(s->s3->tmp.peer_ca_names, X509_NAME_free); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1275 | s->s3->tmp.peer_ca_names = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1276 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1277 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1278 | return executed 108 times by 1 test: 1;return 1;Executed by:
executed 108 times by 1 test: return 1;Executed by:
| 108 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1279 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1280 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1281 | static EXT_RETURN tls_construct_certificate_authorities(SSL *s, WPACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1282 | unsigned int context, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1283 | X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1284 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1285 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1286 | const struct stack_st_X509_NAME *ca_sk = SSL_get0_CA_list(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1287 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1288 | if (ca_sk ==
| 0-3960 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1289 | ((void *)0)
| 0-3960 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1290 | || sk_X509_NAME_num(ca_sk) == 0
| 5-3955 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1291 | return executed 3955 times by 1 test: EXT_RETURN_NOT_SENT;return EXT_RETURN_NOT_SENT;Executed by:
executed 3955 times by 1 test: return EXT_RETURN_NOT_SENT;Executed by:
| 3955 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1293 | if (!WPACKET_put_bytes__((pkt), (47), 2)
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1294 | || !WPACKET_start_sub_packet_len__((pkt), 2)
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1295 | ossl_statem_fatal((s), (80), (542), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1297 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1298 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1300 | 1210 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1301 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1303 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1304 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL;never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1305 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1306 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1307 | if (!construct_ca_names(s, pkt)
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1309 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL;never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1310 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1312 | if (!WPACKET_close(pkt)
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1313 | ossl_statem_fatal((s), (80), (542), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1315 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1316 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1318 | 1222 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1319 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1321 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1322 | return never executed: EXT_RETURN_FAIL;return EXT_RETURN_FAIL;never executed: return EXT_RETURN_FAIL; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1323 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1325 | return executed 5 times by 1 test: EXT_RETURN_SENT;return EXT_RETURN_SENT;Executed by:
executed 5 times by 1 test: return EXT_RETURN_SENT;Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1326 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1328 | static int tls_parse_certificate_authorities(SSL *s, PACKET *pkt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1329 | unsigned int context, X509 *x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1330 | size_t chainidx) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1331 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1332 | if (!parse_ca_names(s, pkt)
| 8-14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1333 | return executed 14 times by 1 test: 0;return 0;Executed by:
executed 14 times by 1 test: return 0;Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1334 | if (PACKET_remaining(pkt) != 0
| 1-7 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1335 | ossl_statem_fatal((s), (50), (566), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1336 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1337 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1338 | 1237 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1339 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1340 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1341 | return executed 1 time by 1 test: 0;return 0;Executed by:
executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1342 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1343 | return executed 7 times by 1 test: 1;return 1;Executed by:
executed 7 times by 1 test: return 1;Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1344 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1347 | static int init_srtp(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1348 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1349 | if (s->server
| 3657-4401 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1350 | s->srtp_profile = executed 3657 times by 1 test: s->srtp_profile = ((void *)0) ;Executed by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1351 | ((void *)0) executed 3657 times by 1 test: s->srtp_profile = ((void *)0) ;Executed by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1352 | ; executed 3657 times by 1 test: s->srtp_profile = ((void *)0) ;Executed by:
| 3657 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1353 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1354 | return executed 8058 times by 1 test: 1;return 1;Executed by:
executed 8058 times by 1 test: return 1;Executed by:
| 8058 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1355 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1358 | static int final_sig_algs(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1359 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1360 | if (!sent
| 0-2225 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1361 | ossl_statem_fatal((s), (109), (497), (112), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1362 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1363 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1364 | 1257 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1365 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1366 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1367 | return executed 9 times by 1 test: 0;return 0;Executed by:
executed 9 times by 1 test: return 0;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1368 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1369 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1370 | return executed 2776 times by 1 test: 1;return 1;Executed by:
executed 2776 times by 1 test: return 1;Executed by:
| 2776 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1371 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1373 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1374 | static int final_key_share(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1375 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1376 | if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
| 186-3846 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1377 | return executed 2399 times by 1 test: 1;return 1;Executed by:
executed 2399 times by 1 test: return 1;Executed by:
| 2399 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1378 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1379 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1380 | if ((
| 0-1633 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1381 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1382 | if (!s->server
| 619-1014 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1383 | && !sent
| 4-615 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1384 | && (!s->hit
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1385 | || (
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1386 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1387 | ossl_statem_fatal((s), (109), (503), (101), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1388 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1389 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1390 | 1291 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1391 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1392 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1393 | return executed 2 times by 1 test: 0;return 0;Executed by:
executed 2 times by 1 test: return 0;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1394 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1395 | if (s->server
| 617-1014 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1396 | if (s->s3->peer_tmp !=
| 138-876 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1397 | ((void *)0)
| 138-876 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1398 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1399 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1400 | if ((
| 4-872 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1401 | && !s->ext.cookieok
| 1-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1402 | if (!((s->hello_retry_request == SSL_HRR_NONE) != 0)
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1404 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1407 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1408 | ossl_statem_fatal((s), (80), (503), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1409 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1410 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1411 | 1340 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1412 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1413 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1414 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1415 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1416 | s->hello_retry_request = SSL_HRR_PENDING; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1417 | return executed 3 times by 1 test: 1;return 1;Executed by:
executed 3 times by 1 test: return 1;Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1418 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1419 | } executed 873 times by 1 test: else {end of blockExecuted by:
| 873 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1421 | if (s->hello_retry_request == SSL_HRR_NONE
| 5-133 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1422 | && (!s->hit
| 21-107 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1423 | || (
| 1-20 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1424 | != 0
| 1-20 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1425 | const uint16_t *pgroups, *clntgroups; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1426 | size_t num_groups, clnt_num_groups, i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1427 | unsigned int group_id = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1428 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1432 | tls1_get_peer_groups(s, &clntgroups, &clnt_num_groups); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1433 | tls1_get_supported_groups(s, &pgroups, &num_groups); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1434 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1436 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1438 | for (i = 0; i < num_groups
| 4-222 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1439 | group_id = pgroups[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1440 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1441 | if (check_in_list(s, group_id, clntgroups, clnt_num_groups,
| 99-123 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1442 | 1)
| 99-123 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1443 | break; executed 123 times by 1 test: break;Executed by:
| 123 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1444 | } executed 99 times by 1 test: end of blockExecuted by:
| 99 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1446 | if (i < num_groups
| 4-123 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1447 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1448 | s->s3->group_id = group_id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1449 | s->hello_retry_request = SSL_HRR_PENDING; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1450 | return executed 123 times by 1 test: 1;return 1;Executed by:
executed 123 times by 1 test: return 1;Executed by:
| 123 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1451 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1452 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1453 | if (!s->hit
| 3-12 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1454 | || (
| 1-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1455 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1456 | ossl_statem_fatal((s), (sent ? 40 : 109), (503), (101), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1458 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1459 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1460 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1461 | 1385 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1462 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1464 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1465 | return executed 13 times by 1 test: 0;return 0;Executed by:
executed 13 times by 1 test: return 0;Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1466 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1467 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1468 | if ((
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1469 | && !s->ext.cookieok
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1470 | if (!((s->hello_retry_request == SSL_HRR_NONE) != 0)
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1471 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1472 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1473 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1476 | ossl_statem_fatal((s), (80), (503), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1477 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1478 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1479 | 1398 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1480 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1481 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1482 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1483 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1484 | s->hello_retry_request = SSL_HRR_PENDING; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1485 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1486 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1487 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1488 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1489 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1490 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1493 | if (s->hello_retry_request == SSL_HRR_PENDING
| 38-837 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1494 | s->hello_retry_request = SSL_HRR_COMPLETE; executed 38 times by 1 test: s->hello_retry_request = SSL_HRR_COMPLETE;Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1495 | } executed 875 times by 1 test: else {end of blockExecuted by:
| 875 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1497 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1499 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1500 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1501 | if (!sent
| 0-615 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1502 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1503 | , 0)
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1504 | ossl_statem_fatal((s), (80), (503), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1505 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1506 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1507 | 1420 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1508 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1509 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1510 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1511 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1512 | } executed 617 times by 1 test: end of blockExecuted by:
| 617 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1514 | return executed 1492 times by 1 test: 1;return 1;Executed by:
executed 1492 times by 1 test: return 1;Executed by:
| 1492 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1515 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1518 | static int init_psk_kex_modes(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1519 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1520 | s->ext.psk_kex_mode = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1521 | return executed 65 times by 1 test: 1;return 1;Executed by:
executed 65 times by 1 test: return 1;Executed by:
| 65 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1522 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1523 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1524 | int tls_psk_do_binder(SSL *s, const EVP_MD *md, const unsigned char *msgstart, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1525 | size_t binderoffset, const unsigned char *binderin, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1526 | unsigned char *binderout, SSL_SESSION *sess, int sign, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1527 | int external) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1528 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1529 | EVP_PKEY *mackey = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1530 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1531 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1532 | EVP_MD_CTX *mctx = | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1533 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1534 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1535 | unsigned char hash[64], binderkey[64]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1536 | unsigned char finishedkey[64], tmpbinder[64]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1537 | unsigned char *early_secret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1538 | static const unsigned char resumption_label[] = "res binder"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1539 | static const unsigned char external_label[] = "ext binder"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1540 | const unsigned char *label; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1541 | size_t bindersize, labelsize, hashsize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1542 | int hashsizei = EVP_MD_size(md); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1543 | int ret = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1544 | int usepskfored = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1545 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1546 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1547 | if (!((hashsizei >= 0) != 0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1548 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1549 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1550 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1551 | 1456 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1552 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1553 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1554 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1555 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1556 | hashsize = (size_t)hashsizei; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1558 | if (external
| 58-250 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1559 | && s->early_data_state == SSL_EARLY_DATA_CONNECTING
| 13-45 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1560 | && s->session->ext.max_early_data == 0
| 1-12 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1561 | && sess->ext.max_early_data > 0
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1562 | usepskfored = 1; executed 12 times by 1 test: usepskfored = 1;Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1563 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1564 | if (external
| 58-250 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1565 | label = external_label; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1566 | labelsize = sizeof(external_label) - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1567 | } executed 58 times by 1 test: else {end of blockExecuted by:
| 58 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1568 | label = resumption_label; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1569 | labelsize = sizeof(resumption_label) - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1570 | } executed 250 times by 1 test: end of blockExecuted by:
| 250 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1571 | if (s->server
| 12-174 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1572 | early_secret = (unsigned char *)s->early_secret; executed 288 times by 1 test: early_secret = (unsigned char *)s->early_secret;Executed by:
| 288 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1573 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1574 | early_secret = (unsigned char *)sess->early_secret; executed 20 times by 1 test: early_secret = (unsigned char *)sess->early_secret;Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1575 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1576 | if (!tls13_generate_secret(s, md,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1577 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1578 | , sess->master_key,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1579 | sess->master_key_length, early_secret)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1581 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1582 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1583 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1585 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1586 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1588 | mctx = EVP_MD_CTX_new(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1589 | if (mctx ==
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1590 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1591 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1592 | || EVP_DigestInit_ex(mctx, md,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1593 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1594 | ) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1595 | || EVP_DigestFinal_ex(mctx, hash,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1596 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1597 | ) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1598 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1599 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1600 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1601 | 1503 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1602 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1603 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1604 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1605 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1606 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1608 | if (!tls13_hkdf_expand(s, md, early_secret, label, labelsize, hash,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1609 | hashsize, binderkey, hashsize)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1611 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1612 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1613 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1615 | if (!tls13_derive_finishedkey(s, md, binderkey, finishedkey, hashsize)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1616 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1617 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1618 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1619 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1620 | if (EVP_DigestInit_ex(mctx, md,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1621 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1622 | ) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1623 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1624 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1625 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1626 | 1522 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1627 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1628 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1629 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1630 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1632 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1633 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1635 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1637 | if (s->hello_retry_request == SSL_HRR_PENDING
| 29-279 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1638 | size_t hdatalen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1639 | void *hdata; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1641 | hdatalen = BIO_ctrl(s->s3->handshake_buffer,3,0,(char *)(&hdata)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1642 | if (hdatalen <= 0
| 0-29 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1643 | ossl_statem_fatal((s), (80), (506), (332), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1644 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1645 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1646 | 1538 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1647 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1648 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1649 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1650 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1653 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1654 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1656 | if (s->server
| 11-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1657 | PACKET hashprefix, msg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1658 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1659 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1660 | if (!PACKET_buf_init(&hashprefix, hdata, hdatalen)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1661 | || !PACKET_forward(&hashprefix, 1)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1662 | || !PACKET_get_length_prefixed_3(&hashprefix, &msg)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1663 | || !PACKET_forward(&hashprefix, 1)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1664 | || !PACKET_get_length_prefixed_3(&hashprefix, &msg)
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1665 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1666 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1667 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1668 | 1556 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1669 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1670 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1671 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1672 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1673 | hdatalen -= PACKET_remaining(&hashprefix); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1674 | } executed 11 times by 1 test: end of blockExecuted by:
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1675 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1676 | if (EVP_DigestUpdate(mctx, hdata, hdatalen) <= 0
| 0-29 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1677 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1678 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1679 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1680 | 1564 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1681 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1682 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1683 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1684 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1685 | } executed 29 times by 1 test: end of blockExecuted by:
| 29 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1687 | if (EVP_DigestUpdate(mctx, msgstart, binderoffset) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1688 | || EVP_DigestFinal_ex(mctx, hash,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1689 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1690 | ) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1691 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1692 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1693 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1694 | 1572 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1695 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1696 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1697 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1698 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1699 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1700 | mackey = EVP_PKEY_new_raw_private_key(855, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1701 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1702 | , finishedkey, | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1703 | hashsize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1704 | if (mackey ==
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1705 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1706 | ) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1707 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1708 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1709 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1710 | 1580 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1711 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1712 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1713 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1714 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1716 | if (!sign
| 134-174 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1717 | binderout = tmpbinder; executed 134 times by 1 test: binderout = tmpbinder;Executed by:
| 134 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1719 | bindersize = hashsize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1720 | if (EVP_DigestSignInit(mctx,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1721 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1722 | , md,
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1723 | ((void *)0)
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1724 | , mackey) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1725 | || EVP_DigestUpdate(mctx,hash,hashsize) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1726 | || EVP_DigestSignFinal(mctx, binderout, &bindersize) <= 0
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1727 | || bindersize != hashsize
| 0-308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1728 | ossl_statem_fatal((s), (80), (506), ((4|64)), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1729 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1730 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1731 | 1593 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1732 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1733 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1734 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1735 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1736 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1737 | if (sign
| 134-174 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1738 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1739 | } executed 174 times by 1 test: else {end of blockExecuted by:
| 174 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1740 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1741 | ret = (CRYPTO_memcmp(binderin, binderout, hashsize) == 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1742 | if (!ret
| 1-133 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1743 | ossl_statem_fatal((s), (47), (506), (253), executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1744 | __FILE__ executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1745 | , executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1746 | 1604 executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1747 | ) executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1748 | ; executed 1 time by 1 test: ossl_statem_fatal((s), (47), (506), (253), __FILE__ , 1604 ) ;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1749 | } executed 134 times by 1 test: end of blockExecuted by:
| 134 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1751 | err: code before this statement executed 308 times by 1 test: err:Executed by:
| 308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1752 | OPENSSL_cleanse(binderkey, sizeof(binderkey)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1753 | OPENSSL_cleanse(finishedkey, sizeof(finishedkey)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1754 | EVP_PKEY_free(mackey); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1755 | EVP_MD_CTX_free(mctx); | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1757 | return executed 308 times by 1 test: ret;return ret;Executed by:
executed 308 times by 1 test: return ret;Executed by:
| 308 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1758 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1760 | static int final_early_data(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1761 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1762 | if (!sent
| 403-3848 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1763 | return executed 3848 times by 1 test: 1;return 1;Executed by:
executed 3848 times by 1 test: return 1;Executed by:
| 3848 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1764 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1765 | if (!s->server
| 150-253 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1766 | if (context == 0x0400
| 18-132 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1767 | && sent
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1768 | && !s->ext.early_data_ok
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1769 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1770 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1771 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1774 | ossl_statem_fatal((s), (47), (556), (233), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1775 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1776 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1777 | 1631 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1778 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1779 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1780 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1781 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1783 | return executed 150 times by 1 test: 1;return 1;Executed by:
executed 150 times by 1 test: return 1;Executed by:
| 150 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1784 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1785 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1786 | if (s->max_early_data == 0
| 50-203 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1787 | || !s->hit
| 6-44 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1788 | || s->session->ext.tick_identity != 0
| 0-44 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1789 | || s->early_data_state != SSL_EARLY_DATA_ACCEPTING
| 3-41 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1790 | || !s->ext.early_data_ok
| 6-35 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1791 | || s->hello_retry_request != SSL_HRR_NONE
| 9-26 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1792 | || (s->ctx->allow_early_data_cb !=
| 8-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1793 | ((void *)0)
| 8-18 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1795 | && !s->ctx->allow_early_data_cb(s,
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1796 | s->ctx->allow_early_data_cb_data)
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1797 | s->ext.early_data = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1798 | } executed 231 times by 1 test: else {end of blockExecuted by:
| 231 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1799 | s->ext.early_data = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1800 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1801 | if (!tls13_change_cipher_state(s,
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1802 | 0x040 | (0x020|0x001))
| 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1803 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1804 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1805 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1806 | } executed 22 times by 1 test: end of blockExecuted by:
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1807 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1808 | return executed 253 times by 1 test: 1;return 1;Executed by:
executed 253 times by 1 test: return 1;Executed by:
| 253 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1809 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1811 | static int final_maxfragmentlen(SSL *s, unsigned int context, int sent) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1812 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1814 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1815 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1816 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1817 | if (s->server
| 0-3371 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1818 | && !sent
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1819 | ossl_statem_fatal((s), (109), (557), (110), | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1820 | __FILE__ | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1821 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1822 | 1670 | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1823 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1824 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1825 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1826 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1827 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1828 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1829 | if (s->session
| 0-6115 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1830 | && s->max_send_fragment < (512U << (s->session->ext.max_fragment_len_mode - 1))
| 6-27 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1832 | if (!ssl3_setup_buffers(s)
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1833 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1834 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1835 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1837 | return executed 6115 times by 1 test: 1;return 1;Executed by:
executed 6115 times by 1 test: return 1;Executed by:
| 6115 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1838 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1839 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1840 | static int init_post_handshake_auth(SSL *s, unsigned int context) | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1841 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1842 | s->post_handshake_auth = SSL_PHA_NONE; | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1843 | - | |||||||||||||||||||||||||||||||||||||||||||||||||
| 1844 | return executed 65 times by 1 test: 1;return 1;Executed by:
executed 65 times by 1 test: return 1;Executed by:
| 65 | ||||||||||||||||||||||||||||||||||||||||||||||||
| 1845 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |