| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/ssl/ssl_lib.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||||||||
| 11 | - | |||||||||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||||||||||||||
| 14 | const char *SSL_version_str = "LibreSSL 2.8.0"; | - | ||||||||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||||||||
| 16 | int | - | ||||||||||||||||||||||||||||||||||||
| 17 | SSL_clear(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 18 | { | - | ||||||||||||||||||||||||||||||||||||
| 19 | if (s->method ==
| 0-341 | ||||||||||||||||||||||||||||||||||||
| 20 | ((void *)0)
| 0-341 | ||||||||||||||||||||||||||||||||||||
| 21 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 22 | SSL_error_internal(s, 188, __FILE__, 166); | - | ||||||||||||||||||||||||||||||||||||
| 23 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 24 | } | - | ||||||||||||||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||||||||||||||
| 26 | if (ssl_clear_bad_session(s)
| 0-341 | ||||||||||||||||||||||||||||||||||||
| 27 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||||||||
| 28 | s->session = | - | ||||||||||||||||||||||||||||||||||||
| 29 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 30 | ; | - | ||||||||||||||||||||||||||||||||||||
| 31 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 32 | - | |||||||||||||||||||||||||||||||||||||
| 33 | s->error = 0; | - | ||||||||||||||||||||||||||||||||||||
| 34 | s->internal->hit = 0; | - | ||||||||||||||||||||||||||||||||||||
| 35 | s->internal->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
| 36 | - | |||||||||||||||||||||||||||||||||||||
| 37 | if (s->internal->renegotiate
| 0-341 | ||||||||||||||||||||||||||||||||||||
| 38 | SSL_error_internal(s, (4|64), __FILE__, 180); | - | ||||||||||||||||||||||||||||||||||||
| 39 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 40 | } | - | ||||||||||||||||||||||||||||||||||||
| 41 | - | |||||||||||||||||||||||||||||||||||||
| 42 | s->internal->type = 0; | - | ||||||||||||||||||||||||||||||||||||
| 43 | - | |||||||||||||||||||||||||||||||||||||
| 44 | s->version = s->method->internal->version; | - | ||||||||||||||||||||||||||||||||||||
| 45 | s->client_version = s->version; | - | ||||||||||||||||||||||||||||||||||||
| 46 | s->internal->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
| 47 | s->internal->rstate = 0xF0; | - | ||||||||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||||||||
| 49 | BUF_MEM_free(s->internal->init_buf); | - | ||||||||||||||||||||||||||||||||||||
| 50 | s->internal->init_buf = | - | ||||||||||||||||||||||||||||||||||||
| 51 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 52 | ; | - | ||||||||||||||||||||||||||||||||||||
| 53 | - | |||||||||||||||||||||||||||||||||||||
| 54 | ssl_clear_cipher_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 55 | - | |||||||||||||||||||||||||||||||||||||
| 56 | s->internal->first_packet = 0; | - | ||||||||||||||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||||||||||||||
| 61 | - | |||||||||||||||||||||||||||||||||||||
| 62 | if (!s->internal->in_handshake
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 63 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 64 | )
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 65 | (
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 66 | s->method->internal->ssl_free(s); | - | ||||||||||||||||||||||||||||||||||||
| 67 | s->method = s->ctx->method; | - | ||||||||||||||||||||||||||||||||||||
| 68 | if (!s->method->internal->ssl_new(s)
| 0 | ||||||||||||||||||||||||||||||||||||
| 69 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 70 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
| 71 | s->method->internal->ssl_clear(s); executed 341 times by 11 tests: s->method->internal->ssl_clear(s);Executed by:
| 341 | ||||||||||||||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||||||||||||||
| 73 | (s->s3->internal)->hs.state = 0x4000|((s->server) ? 0x2000 : 0x1000); | - | ||||||||||||||||||||||||||||||||||||
| 74 | - | |||||||||||||||||||||||||||||||||||||
| 75 | return executed 341 times by 11 tests: (1);return (1);Executed by:
executed 341 times by 11 tests: return (1);Executed by:
| 341 | ||||||||||||||||||||||||||||||||||||
| 76 | } | - | ||||||||||||||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||||||||||||||
| 78 | - | |||||||||||||||||||||||||||||||||||||
| 79 | int | - | ||||||||||||||||||||||||||||||||||||
| 80 | SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
| 81 | { | - | ||||||||||||||||||||||||||||||||||||
| 82 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||||||||||||||
| 84 | ctx->method = meth; | - | ||||||||||||||||||||||||||||||||||||
| 85 | - | |||||||||||||||||||||||||||||||||||||
| 86 | sk = ssl_create_cipher_list(ctx->method, &(ctx->cipher_list), | - | ||||||||||||||||||||||||||||||||||||
| 87 | &(ctx->internal->cipher_list_by_id), "ALL:!aNULL:!eNULL:!SSLv2"); | - | ||||||||||||||||||||||||||||||||||||
| 88 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 89 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 90 | )
| 0 | ||||||||||||||||||||||||||||||||||||
| 91 | ERR_put_error(20,(0xfff),(230),__FILE__,227); | - | ||||||||||||||||||||||||||||||||||||
| 92 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 93 | } | - | ||||||||||||||||||||||||||||||||||||
| 94 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 95 | } | - | ||||||||||||||||||||||||||||||||||||
| 96 | - | |||||||||||||||||||||||||||||||||||||
| 97 | SSL * | - | ||||||||||||||||||||||||||||||||||||
| 98 | SSL_new(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 99 | { | - | ||||||||||||||||||||||||||||||||||||
| 100 | SSL *s; | - | ||||||||||||||||||||||||||||||||||||
| 101 | - | |||||||||||||||||||||||||||||||||||||
| 102 | if (ctx ==
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 103 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 104 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 105 | ERR_put_error(20,(0xfff),(195),__FILE__,239); | - | ||||||||||||||||||||||||||||||||||||
| 106 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 107 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 108 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 109 | } | - | ||||||||||||||||||||||||||||||||||||
| 110 | if (ctx->method ==
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 111 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 112 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 113 | ERR_put_error(20,(0xfff),(228),__FILE__,243); | - | ||||||||||||||||||||||||||||||||||||
| 114 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 115 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 116 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 117 | } | - | ||||||||||||||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||||||||||||||
| 119 | if ((
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 120 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 121 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 122 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,248); | - | ||||||||||||||||||||||||||||||||||||
| 123 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 124 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 125 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 126 | } | - | ||||||||||||||||||||||||||||||||||||
| 127 | if ((
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 128 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 129 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 130 | free(s); | - | ||||||||||||||||||||||||||||||||||||
| 131 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,253); | - | ||||||||||||||||||||||||||||||||||||
| 132 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 133 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 134 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 135 | } | - | ||||||||||||||||||||||||||||||||||||
| 136 | - | |||||||||||||||||||||||||||||||||||||
| 137 | s->internal->min_version = ctx->internal->min_version; | - | ||||||||||||||||||||||||||||||||||||
| 138 | s->internal->max_version = ctx->internal->max_version; | - | ||||||||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||||||||
| 140 | s->internal->options = ctx->internal->options; | - | ||||||||||||||||||||||||||||||||||||
| 141 | s->internal->mode = ctx->internal->mode; | - | ||||||||||||||||||||||||||||||||||||
| 142 | s->internal->max_cert_list = ctx->internal->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||||||||||||||
| 144 | if (ctx->internal->cert !=
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 145 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 146 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 147 | s->cert = ssl_cert_dup(ctx->internal->cert); | - | ||||||||||||||||||||||||||||||||||||
| 148 | if (s->cert ==
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 149 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 150 | ) | - | ||||||||||||||||||||||||||||||||||||
| 151 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 152 | } executed 202 times by 11 tests: elseend of blockExecuted by:
| 202 | ||||||||||||||||||||||||||||||||||||
| 153 | s->cert= never executed: s->cert= ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 154 | ((void *)0) never executed: s->cert= ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 155 | ; never executed: s->cert= ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 156 | - | |||||||||||||||||||||||||||||||||||||
| 157 | s->internal->read_ahead = ctx->internal->read_ahead; | - | ||||||||||||||||||||||||||||||||||||
| 158 | s->internal->msg_callback = ctx->internal->msg_callback; | - | ||||||||||||||||||||||||||||||||||||
| 159 | s->internal->msg_callback_arg = ctx->internal->msg_callback_arg; | - | ||||||||||||||||||||||||||||||||||||
| 160 | s->verify_mode = ctx->verify_mode; | - | ||||||||||||||||||||||||||||||||||||
| 161 | s->sid_ctx_length = ctx->sid_ctx_length; | - | ||||||||||||||||||||||||||||||||||||
| 162 | (void)((s->sid_ctx_length <= sizeof s->sid_ctx) ? 0 : (OpenSSLDie(__FILE__, 287, "s->sid_ctx_length <= sizeof s->sid_ctx"),1)); | - | ||||||||||||||||||||||||||||||||||||
| 163 | memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx)); | - | ||||||||||||||||||||||||||||||||||||
| 164 | s->internal->verify_callback = ctx->internal->default_verify_callback; | - | ||||||||||||||||||||||||||||||||||||
| 165 | s->internal->generate_session_id = ctx->internal->generate_session_id; | - | ||||||||||||||||||||||||||||||||||||
| 166 | - | |||||||||||||||||||||||||||||||||||||
| 167 | s->param = X509_VERIFY_PARAM_new(); | - | ||||||||||||||||||||||||||||||||||||
| 168 | if (!s->param
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 169 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 170 | X509_VERIFY_PARAM_inherit(s->param, ctx->param); | - | ||||||||||||||||||||||||||||||||||||
| 171 | s->internal->quiet_shutdown = ctx->internal->quiet_shutdown; | - | ||||||||||||||||||||||||||||||||||||
| 172 | s->max_send_fragment = ctx->internal->max_send_fragment; | - | ||||||||||||||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||||||||||||||
| 174 | CRYPTO_add_lock(&ctx->references,1,12,__FILE__,299); | - | ||||||||||||||||||||||||||||||||||||
| 175 | s->ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
| 176 | s->internal->tlsext_debug_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 177 | s->internal->tlsext_debug_arg = | - | ||||||||||||||||||||||||||||||||||||
| 178 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 179 | ; | - | ||||||||||||||||||||||||||||||||||||
| 180 | s->internal->tlsext_ticket_expected = 0; | - | ||||||||||||||||||||||||||||||||||||
| 181 | s->tlsext_status_type = -1; | - | ||||||||||||||||||||||||||||||||||||
| 182 | s->internal->tlsext_status_expected = 0; | - | ||||||||||||||||||||||||||||||||||||
| 183 | s->internal->tlsext_ocsp_ids = | - | ||||||||||||||||||||||||||||||||||||
| 184 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 185 | ; | - | ||||||||||||||||||||||||||||||||||||
| 186 | s->internal->tlsext_ocsp_exts = | - | ||||||||||||||||||||||||||||||||||||
| 187 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 188 | ; | - | ||||||||||||||||||||||||||||||||||||
| 189 | s->internal->tlsext_ocsp_resp = | - | ||||||||||||||||||||||||||||||||||||
| 190 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 191 | ; | - | ||||||||||||||||||||||||||||||||||||
| 192 | s->internal->tlsext_ocsp_resplen = -1; | - | ||||||||||||||||||||||||||||||||||||
| 193 | CRYPTO_add_lock(&ctx->references,1,12,__FILE__,310); | - | ||||||||||||||||||||||||||||||||||||
| 194 | s->initial_ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||||||||||||||
| 196 | if (ctx->internal->tlsext_ecpointformatlist !=
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 197 | ((void *)0)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 198 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 199 | s->internal->tlsext_ecpointformatlist = | - | ||||||||||||||||||||||||||||||||||||
| 200 | calloc(ctx->internal->tlsext_ecpointformatlist_length, | - | ||||||||||||||||||||||||||||||||||||
| 201 | sizeof(ctx->internal->tlsext_ecpointformatlist[0])); | - | ||||||||||||||||||||||||||||||||||||
| 202 | if (s->internal->tlsext_ecpointformatlist ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 203 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 204 | ) | - | ||||||||||||||||||||||||||||||||||||
| 205 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 206 | memcpy(s->internal->tlsext_ecpointformatlist, | - | ||||||||||||||||||||||||||||||||||||
| 207 | ctx->internal->tlsext_ecpointformatlist, | - | ||||||||||||||||||||||||||||||||||||
| 208 | ctx->internal->tlsext_ecpointformatlist_length * | - | ||||||||||||||||||||||||||||||||||||
| 209 | sizeof(ctx->internal->tlsext_ecpointformatlist[0])); | - | ||||||||||||||||||||||||||||||||||||
| 210 | s->internal->tlsext_ecpointformatlist_length = | - | ||||||||||||||||||||||||||||||||||||
| 211 | ctx->internal->tlsext_ecpointformatlist_length; | - | ||||||||||||||||||||||||||||||||||||
| 212 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 213 | if (ctx->internal->tlsext_supportedgroups !=
| 57-145 | ||||||||||||||||||||||||||||||||||||
| 214 | ((void *)0)
| 57-145 | ||||||||||||||||||||||||||||||||||||
| 215 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 216 | s->internal->tlsext_supportedgroups = | - | ||||||||||||||||||||||||||||||||||||
| 217 | calloc(ctx->internal->tlsext_supportedgroups_length, | - | ||||||||||||||||||||||||||||||||||||
| 218 | sizeof(ctx->internal->tlsext_supportedgroups)); | - | ||||||||||||||||||||||||||||||||||||
| 219 | if (s->internal->tlsext_supportedgroups ==
| 0-57 | ||||||||||||||||||||||||||||||||||||
| 220 | ((void *)0)
| 0-57 | ||||||||||||||||||||||||||||||||||||
| 221 | ) | - | ||||||||||||||||||||||||||||||||||||
| 222 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 223 | memcpy(s->internal->tlsext_supportedgroups, | - | ||||||||||||||||||||||||||||||||||||
| 224 | ctx->internal->tlsext_supportedgroups, | - | ||||||||||||||||||||||||||||||||||||
| 225 | ctx->internal->tlsext_supportedgroups_length * | - | ||||||||||||||||||||||||||||||||||||
| 226 | sizeof(ctx->internal->tlsext_supportedgroups[0])); | - | ||||||||||||||||||||||||||||||||||||
| 227 | s->internal->tlsext_supportedgroups_length = | - | ||||||||||||||||||||||||||||||||||||
| 228 | ctx->internal->tlsext_supportedgroups_length; | - | ||||||||||||||||||||||||||||||||||||
| 229 | } executed 57 times by 2 tests: end of blockExecuted by:
| 57 | ||||||||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||||||||
| 231 | if (s->ctx->internal->alpn_client_proto_list !=
| 8-194 | ||||||||||||||||||||||||||||||||||||
| 232 | ((void *)0)
| 8-194 | ||||||||||||||||||||||||||||||||||||
| 233 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 234 | s->internal->alpn_client_proto_list = | - | ||||||||||||||||||||||||||||||||||||
| 235 | malloc(s->ctx->internal->alpn_client_proto_list_len); | - | ||||||||||||||||||||||||||||||||||||
| 236 | if (s->internal->alpn_client_proto_list ==
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 237 | ((void *)0)
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 238 | ) | - | ||||||||||||||||||||||||||||||||||||
| 239 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 240 | memcpy(s->internal->alpn_client_proto_list, | - | ||||||||||||||||||||||||||||||||||||
| 241 | s->ctx->internal->alpn_client_proto_list, | - | ||||||||||||||||||||||||||||||||||||
| 242 | s->ctx->internal->alpn_client_proto_list_len); | - | ||||||||||||||||||||||||||||||||||||
| 243 | s->internal->alpn_client_proto_list_len = | - | ||||||||||||||||||||||||||||||||||||
| 244 | s->ctx->internal->alpn_client_proto_list_len; | - | ||||||||||||||||||||||||||||||||||||
| 245 | } executed 8 times by 1 test: end of blockExecuted by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 246 | - | |||||||||||||||||||||||||||||||||||||
| 247 | s->verify_result = 0; | - | ||||||||||||||||||||||||||||||||||||
| 248 | - | |||||||||||||||||||||||||||||||||||||
| 249 | s->method = ctx->method; | - | ||||||||||||||||||||||||||||||||||||
| 250 | - | |||||||||||||||||||||||||||||||||||||
| 251 | if (!s->method->internal->ssl_new(s)
| 0-202 | ||||||||||||||||||||||||||||||||||||
| 252 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 253 | - | |||||||||||||||||||||||||||||||||||||
| 254 | s->references = 1; | - | ||||||||||||||||||||||||||||||||||||
| 255 | s->server = (
| 36-166 | ||||||||||||||||||||||||||||||||||||
| 256 | - | |||||||||||||||||||||||||||||||||||||
| 257 | SSL_clear(s); | - | ||||||||||||||||||||||||||||||||||||
| 258 | - | |||||||||||||||||||||||||||||||||||||
| 259 | CRYPTO_new_ex_data(1, s, &s->internal->ex_data); | - | ||||||||||||||||||||||||||||||||||||
| 260 | - | |||||||||||||||||||||||||||||||||||||
| 261 | return executed 202 times by 11 tests: (s);return (s);Executed by:
executed 202 times by 11 tests: return (s);Executed by:
| 202 | ||||||||||||||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||||||||||||||
| 263 | err: | - | ||||||||||||||||||||||||||||||||||||
| 264 | SSL_free(s); | - | ||||||||||||||||||||||||||||||||||||
| 265 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,370); | - | ||||||||||||||||||||||||||||||||||||
| 266 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 267 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 268 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 269 | } | - | ||||||||||||||||||||||||||||||||||||
| 270 | - | |||||||||||||||||||||||||||||||||||||
| 271 | int | - | ||||||||||||||||||||||||||||||||||||
| 272 | SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||||||||||||||
| 273 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||||||||||||||
| 274 | { | - | ||||||||||||||||||||||||||||||||||||
| 275 | if (sid_ctx_len > sizeof ctx->sid_ctx
| 0-54 | ||||||||||||||||||||||||||||||||||||
| 276 | ERR_put_error(20,(0xfff),(273),__FILE__,379); | - | ||||||||||||||||||||||||||||||||||||
| 277 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 278 | } | - | ||||||||||||||||||||||||||||||||||||
| 279 | ctx->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||||||||||||||
| 280 | memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len); | - | ||||||||||||||||||||||||||||||||||||
| 281 | - | |||||||||||||||||||||||||||||||||||||
| 282 | return executed 54 times by 2 tests: (1);return (1);Executed by:
executed 54 times by 2 tests: return (1);Executed by:
| 54 | ||||||||||||||||||||||||||||||||||||
| 283 | } | - | ||||||||||||||||||||||||||||||||||||
| 284 | - | |||||||||||||||||||||||||||||||||||||
| 285 | int | - | ||||||||||||||||||||||||||||||||||||
| 286 | SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||||||||||||||
| 287 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||||||||||||||
| 288 | { | - | ||||||||||||||||||||||||||||||||||||
| 289 | if (sid_ctx_len > 32
| 0 | ||||||||||||||||||||||||||||||||||||
| 290 | SSL_error_internal(ssl, 273, __FILE__, 393); | - | ||||||||||||||||||||||||||||||||||||
| 291 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 292 | } | - | ||||||||||||||||||||||||||||||||||||
| 293 | ssl->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||||||||||||||
| 294 | memcpy(ssl->sid_ctx, sid_ctx, sid_ctx_len); | - | ||||||||||||||||||||||||||||||||||||
| 295 | - | |||||||||||||||||||||||||||||||||||||
| 296 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 297 | } | - | ||||||||||||||||||||||||||||||||||||
| 298 | - | |||||||||||||||||||||||||||||||||||||
| 299 | int | - | ||||||||||||||||||||||||||||||||||||
| 300 | SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) | - | ||||||||||||||||||||||||||||||||||||
| 301 | { | - | ||||||||||||||||||||||||||||||||||||
| 302 | CRYPTO_lock(1|8,12,__FILE__,405); | - | ||||||||||||||||||||||||||||||||||||
| 303 | ctx->internal->generate_session_id = cb; | - | ||||||||||||||||||||||||||||||||||||
| 304 | CRYPTO_lock(2|8,12,__FILE__,407); | - | ||||||||||||||||||||||||||||||||||||
| 305 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 306 | } | - | ||||||||||||||||||||||||||||||||||||
| 307 | - | |||||||||||||||||||||||||||||||||||||
| 308 | int | - | ||||||||||||||||||||||||||||||||||||
| 309 | SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) | - | ||||||||||||||||||||||||||||||||||||
| 310 | { | - | ||||||||||||||||||||||||||||||||||||
| 311 | CRYPTO_lock(1|8,16,__FILE__,414); | - | ||||||||||||||||||||||||||||||||||||
| 312 | ssl->internal->generate_session_id = cb; | - | ||||||||||||||||||||||||||||||||||||
| 313 | CRYPTO_lock(2|8,16,__FILE__,416); | - | ||||||||||||||||||||||||||||||||||||
| 314 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 315 | } | - | ||||||||||||||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||||||||||||||
| 317 | int | - | ||||||||||||||||||||||||||||||||||||
| 318 | SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, | - | ||||||||||||||||||||||||||||||||||||
| 319 | unsigned int id_len) | - | ||||||||||||||||||||||||||||||||||||
| 320 | { | - | ||||||||||||||||||||||||||||||||||||
| 321 | - | |||||||||||||||||||||||||||||||||||||
| 322 | - | |||||||||||||||||||||||||||||||||||||
| 323 | - | |||||||||||||||||||||||||||||||||||||
| 324 | - | |||||||||||||||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||||||||||||||
| 326 | - | |||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||
| 328 | SSL_SESSION r, *p; | - | ||||||||||||||||||||||||||||||||||||
| 329 | - | |||||||||||||||||||||||||||||||||||||
| 330 | if (id_len > sizeof r.session_id
| 0-12 | ||||||||||||||||||||||||||||||||||||
| 331 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 332 | - | |||||||||||||||||||||||||||||||||||||
| 333 | r.ssl_version = ssl->version; | - | ||||||||||||||||||||||||||||||||||||
| 334 | r.session_id_length = id_len; | - | ||||||||||||||||||||||||||||||||||||
| 335 | memcpy(r.session_id, id, id_len); | - | ||||||||||||||||||||||||||||||||||||
| 336 | - | |||||||||||||||||||||||||||||||||||||
| 337 | CRYPTO_lock(1|4,12,__FILE__,440); | - | ||||||||||||||||||||||||||||||||||||
| 338 | p = ((SSL_SESSION *)lh_retrieve(((_LHASH *)((void*) (1 ? ssl->ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0))), ((void*) (1 ? &r : (SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||||||||||||||
| 339 | CRYPTO_lock(2|4,12,__FILE__,442); | - | ||||||||||||||||||||||||||||||||||||
| 340 | return executed 12 times by 2 tests: (p != return (p != ((void *)0) );Executed by:
executed 12 times by 2 tests: return (p != ((void *)0) );Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 341 | ((void *)0) executed 12 times by 2 tests: return (p != ((void *)0) );Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 342 | ); executed 12 times by 2 tests: return (p != ((void *)0) );Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 343 | } | - | ||||||||||||||||||||||||||||||||||||
| 344 | - | |||||||||||||||||||||||||||||||||||||
| 345 | int | - | ||||||||||||||||||||||||||||||||||||
| 346 | SSL_CTX_set_purpose(SSL_CTX *s, int purpose) | - | ||||||||||||||||||||||||||||||||||||
| 347 | { | - | ||||||||||||||||||||||||||||||||||||
| 348 | return never executed: (X509_VERIFY_PARAM_set_purpose(s->param, purpose));return (X509_VERIFY_PARAM_set_purpose(s->param, purpose));never executed: return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); | 0 | ||||||||||||||||||||||||||||||||||||
| 349 | } | - | ||||||||||||||||||||||||||||||||||||
| 350 | - | |||||||||||||||||||||||||||||||||||||
| 351 | int | - | ||||||||||||||||||||||||||||||||||||
| 352 | SSL_set_purpose(SSL *s, int purpose) | - | ||||||||||||||||||||||||||||||||||||
| 353 | { | - | ||||||||||||||||||||||||||||||||||||
| 354 | return never executed: (X509_VERIFY_PARAM_set_purpose(s->param, purpose));return (X509_VERIFY_PARAM_set_purpose(s->param, purpose));never executed: return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); | 0 | ||||||||||||||||||||||||||||||||||||
| 355 | } | - | ||||||||||||||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||||||||||||||
| 357 | int | - | ||||||||||||||||||||||||||||||||||||
| 358 | SSL_CTX_set_trust(SSL_CTX *s, int trust) | - | ||||||||||||||||||||||||||||||||||||
| 359 | { | - | ||||||||||||||||||||||||||||||||||||
| 360 | return never executed: (X509_VERIFY_PARAM_set_trust(s->param, trust));return (X509_VERIFY_PARAM_set_trust(s->param, trust));never executed: return (X509_VERIFY_PARAM_set_trust(s->param, trust)); | 0 | ||||||||||||||||||||||||||||||||||||
| 361 | } | - | ||||||||||||||||||||||||||||||||||||
| 362 | - | |||||||||||||||||||||||||||||||||||||
| 363 | int | - | ||||||||||||||||||||||||||||||||||||
| 364 | SSL_set_trust(SSL *s, int trust) | - | ||||||||||||||||||||||||||||||||||||
| 365 | { | - | ||||||||||||||||||||||||||||||||||||
| 366 | return never executed: (X509_VERIFY_PARAM_set_trust(s->param, trust));return (X509_VERIFY_PARAM_set_trust(s->param, trust));never executed: return (X509_VERIFY_PARAM_set_trust(s->param, trust)); | 0 | ||||||||||||||||||||||||||||||||||||
| 367 | } | - | ||||||||||||||||||||||||||||||||||||
| 368 | - | |||||||||||||||||||||||||||||||||||||
| 369 | X509_VERIFY_PARAM * | - | ||||||||||||||||||||||||||||||||||||
| 370 | SSL_CTX_get0_param(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 371 | { | - | ||||||||||||||||||||||||||||||||||||
| 372 | return never executed: (ctx->param);return (ctx->param);never executed: return (ctx->param); | 0 | ||||||||||||||||||||||||||||||||||||
| 373 | } | - | ||||||||||||||||||||||||||||||||||||
| 374 | - | |||||||||||||||||||||||||||||||||||||
| 375 | int | - | ||||||||||||||||||||||||||||||||||||
| 376 | SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) | - | ||||||||||||||||||||||||||||||||||||
| 377 | { | - | ||||||||||||||||||||||||||||||||||||
| 378 | return never executed: (X509_VERIFY_PARAM_set1(ctx->param, vpm));return (X509_VERIFY_PARAM_set1(ctx->param, vpm));never executed: return (X509_VERIFY_PARAM_set1(ctx->param, vpm)); | 0 | ||||||||||||||||||||||||||||||||||||
| 379 | } | - | ||||||||||||||||||||||||||||||||||||
| 380 | - | |||||||||||||||||||||||||||||||||||||
| 381 | X509_VERIFY_PARAM * | - | ||||||||||||||||||||||||||||||||||||
| 382 | SSL_get0_param(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 383 | { | - | ||||||||||||||||||||||||||||||||||||
| 384 | return never executed: (ssl->param);return (ssl->param);never executed: return (ssl->param); | 0 | ||||||||||||||||||||||||||||||||||||
| 385 | } | - | ||||||||||||||||||||||||||||||||||||
| 386 | - | |||||||||||||||||||||||||||||||||||||
| 387 | int | - | ||||||||||||||||||||||||||||||||||||
| 388 | SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm) | - | ||||||||||||||||||||||||||||||||||||
| 389 | { | - | ||||||||||||||||||||||||||||||||||||
| 390 | return never executed: (X509_VERIFY_PARAM_set1(ssl->param, vpm));return (X509_VERIFY_PARAM_set1(ssl->param, vpm));never executed: return (X509_VERIFY_PARAM_set1(ssl->param, vpm)); | 0 | ||||||||||||||||||||||||||||||||||||
| 391 | } | - | ||||||||||||||||||||||||||||||||||||
| 392 | - | |||||||||||||||||||||||||||||||||||||
| 393 | void | - | ||||||||||||||||||||||||||||||||||||
| 394 | SSL_free(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 395 | { | - | ||||||||||||||||||||||||||||||||||||
| 396 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 397 | - | |||||||||||||||||||||||||||||||||||||
| 398 | if (s ==
| 75-195 | ||||||||||||||||||||||||||||||||||||
| 399 | ((void *)0)
| 75-195 | ||||||||||||||||||||||||||||||||||||
| 400 | ) | - | ||||||||||||||||||||||||||||||||||||
| 401 | return; executed 75 times by 3 tests: return;Executed by:
| 75 | ||||||||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||||||||
| 403 | i = CRYPTO_add_lock(&s->references,-1,16,__FILE__,502); | - | ||||||||||||||||||||||||||||||||||||
| 404 | if (i > 0
| 0-195 | ||||||||||||||||||||||||||||||||||||
| 405 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 406 | - | |||||||||||||||||||||||||||||||||||||
| 407 | X509_VERIFY_PARAM_free(s->param); | - | ||||||||||||||||||||||||||||||||||||
| 408 | - | |||||||||||||||||||||||||||||||||||||
| 409 | CRYPTO_free_ex_data(1, s, &s->internal->ex_data); | - | ||||||||||||||||||||||||||||||||||||
| 410 | - | |||||||||||||||||||||||||||||||||||||
| 411 | if (s->bbio !=
| 13-182 | ||||||||||||||||||||||||||||||||||||
| 412 | ((void *)0)
| 13-182 | ||||||||||||||||||||||||||||||||||||
| 413 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 414 | - | |||||||||||||||||||||||||||||||||||||
| 415 | if (s->bbio == s->wbio
| 0-13 | ||||||||||||||||||||||||||||||||||||
| 416 | s->wbio = BIO_pop(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
| 417 | } executed 13 times by 2 tests: end of blockExecuted by:
| 13 | ||||||||||||||||||||||||||||||||||||
| 418 | BIO_free(s->bbio); | - | ||||||||||||||||||||||||||||||||||||
| 419 | s->bbio = | - | ||||||||||||||||||||||||||||||||||||
| 420 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 421 | ; | - | ||||||||||||||||||||||||||||||||||||
| 422 | } executed 13 times by 2 tests: end of blockExecuted by:
| 13 | ||||||||||||||||||||||||||||||||||||
| 423 | - | |||||||||||||||||||||||||||||||||||||
| 424 | if (s->rbio != s->wbio
| 15-180 | ||||||||||||||||||||||||||||||||||||
| 425 | BIO_free_all(s->rbio); executed 15 times by 3 tests: BIO_free_all(s->rbio);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 426 | BIO_free_all(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
| 427 | - | |||||||||||||||||||||||||||||||||||||
| 428 | BUF_MEM_free(s->internal->init_buf); | - | ||||||||||||||||||||||||||||||||||||
| 429 | - | |||||||||||||||||||||||||||||||||||||
| 430 | - | |||||||||||||||||||||||||||||||||||||
| 431 | sk_free(((_STACK*) (1 ? (s->cipher_list) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 432 | sk_free(((_STACK*) (1 ? (s->internal->cipher_list_by_id) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 433 | - | |||||||||||||||||||||||||||||||||||||
| 434 | - | |||||||||||||||||||||||||||||||||||||
| 435 | if (s->session !=
| 66-129 | ||||||||||||||||||||||||||||||||||||
| 436 | ((void *)0)
| 66-129 | ||||||||||||||||||||||||||||||||||||
| 437 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 438 | ssl_clear_bad_session(s); | - | ||||||||||||||||||||||||||||||||||||
| 439 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||||||||
| 440 | } executed 129 times by 5 tests: end of blockExecuted by:
| 129 | ||||||||||||||||||||||||||||||||||||
| 441 | - | |||||||||||||||||||||||||||||||||||||
| 442 | ssl_clear_cipher_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 443 | - | |||||||||||||||||||||||||||||||||||||
| 444 | ssl_cert_free(s->cert); | - | ||||||||||||||||||||||||||||||||||||
| 445 | - | |||||||||||||||||||||||||||||||||||||
| 446 | free(s->tlsext_hostname); | - | ||||||||||||||||||||||||||||||||||||
| 447 | SSL_CTX_free(s->initial_ctx); | - | ||||||||||||||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||||||||||||||
| 449 | free(s->internal->tlsext_ecpointformatlist); | - | ||||||||||||||||||||||||||||||||||||
| 450 | free(s->internal->tlsext_supportedgroups); | - | ||||||||||||||||||||||||||||||||||||
| 451 | - | |||||||||||||||||||||||||||||||||||||
| 452 | sk_pop_free(((_STACK*) (1 ? (s->internal->tlsext_ocsp_exts) : (struct stack_st_X509_EXTENSION*)0)), ((void (*)(void *)) ((1 ? (X509_EXTENSION_free) : (void (*)(X509_EXTENSION *))0)))) | - | ||||||||||||||||||||||||||||||||||||
| 453 | ; | - | ||||||||||||||||||||||||||||||||||||
| 454 | sk_pop_free(((_STACK*) (1 ? (s->internal->tlsext_ocsp_ids) : (struct stack_st_OCSP_RESPID*)0)), ((void (*)(void *)) ((1 ? (OCSP_RESPID_free) : (void (*)(OCSP_RESPID *))0)))); | - | ||||||||||||||||||||||||||||||||||||
| 455 | free(s->internal->tlsext_ocsp_resp); | - | ||||||||||||||||||||||||||||||||||||
| 456 | - | |||||||||||||||||||||||||||||||||||||
| 457 | sk_pop_free(((_STACK*) (1 ? (s->internal->client_CA) : (struct stack_st_X509_NAME*)0)), ((void (*)(void *)) ((1 ? (X509_NAME_free) : (void (*)(X509_NAME *))0)))); | - | ||||||||||||||||||||||||||||||||||||
| 458 | - | |||||||||||||||||||||||||||||||||||||
| 459 | if (s->method !=
| 0-195 | ||||||||||||||||||||||||||||||||||||
| 460 | ((void *)0)
| 0-195 | ||||||||||||||||||||||||||||||||||||
| 461 | ) | - | ||||||||||||||||||||||||||||||||||||
| 462 | s->method->internal->ssl_free(s); executed 195 times by 11 tests: s->method->internal->ssl_free(s);Executed by:
| 195 | ||||||||||||||||||||||||||||||||||||
| 463 | - | |||||||||||||||||||||||||||||||||||||
| 464 | SSL_CTX_free(s->ctx); | - | ||||||||||||||||||||||||||||||||||||
| 465 | - | |||||||||||||||||||||||||||||||||||||
| 466 | free(s->internal->alpn_client_proto_list); | - | ||||||||||||||||||||||||||||||||||||
| 467 | - | |||||||||||||||||||||||||||||||||||||
| 468 | - | |||||||||||||||||||||||||||||||||||||
| 469 | sk_free(((_STACK*) (1 ? (s->internal->srtp_profiles) : (struct stack_st_SRTP_PROTECTION_PROFILE*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 470 | - | |||||||||||||||||||||||||||||||||||||
| 471 | - | |||||||||||||||||||||||||||||||||||||
| 472 | free(s->internal); | - | ||||||||||||||||||||||||||||||||||||
| 473 | free(s); | - | ||||||||||||||||||||||||||||||||||||
| 474 | } executed 195 times by 11 tests: end of blockExecuted by:
| 195 | ||||||||||||||||||||||||||||||||||||
| 475 | - | |||||||||||||||||||||||||||||||||||||
| 476 | int | - | ||||||||||||||||||||||||||||||||||||
| 477 | SSL_up_ref(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 478 | { | - | ||||||||||||||||||||||||||||||||||||
| 479 | int refs = CRYPTO_add_lock(&s->references,1,16,__FILE__,570); | - | ||||||||||||||||||||||||||||||||||||
| 480 | return never executed: (return (refs > 1) ? 1 : 0;
never executed: return (refs > 1) ? 1 : 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 481 | } | - | ||||||||||||||||||||||||||||||||||||
| 482 | - | |||||||||||||||||||||||||||||||||||||
| 483 | void | - | ||||||||||||||||||||||||||||||||||||
| 484 | SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | - | ||||||||||||||||||||||||||||||||||||
| 485 | { | - | ||||||||||||||||||||||||||||||||||||
| 486 | - | |||||||||||||||||||||||||||||||||||||
| 487 | if (s->bbio !=
| 0-143 | ||||||||||||||||||||||||||||||||||||
| 488 | ((void *)0)
| 0-143 | ||||||||||||||||||||||||||||||||||||
| 489 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 490 | if (s->wbio == s->bbio
| 0 | ||||||||||||||||||||||||||||||||||||
| 491 | s->wbio = s->wbio->next_bio; | - | ||||||||||||||||||||||||||||||||||||
| 492 | s->bbio->next_bio = | - | ||||||||||||||||||||||||||||||||||||
| 493 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 494 | ; | - | ||||||||||||||||||||||||||||||||||||
| 495 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 496 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 497 | - | |||||||||||||||||||||||||||||||||||||
| 498 | if (s->rbio != rbio
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 499 | BIO_free_all(s->rbio); never executed: BIO_free_all(s->rbio); | 0 | ||||||||||||||||||||||||||||||||||||
| 500 | if (s->wbio != wbio
| 4-139 | ||||||||||||||||||||||||||||||||||||
| 501 | BIO_free_all(s->wbio); executed 139 times by 4 tests: BIO_free_all(s->wbio);Executed by:
| 139 | ||||||||||||||||||||||||||||||||||||
| 502 | s->rbio = rbio; | - | ||||||||||||||||||||||||||||||||||||
| 503 | s->wbio = wbio; | - | ||||||||||||||||||||||||||||||||||||
| 504 | } executed 143 times by 4 tests: end of blockExecuted by:
| 143 | ||||||||||||||||||||||||||||||||||||
| 505 | - | |||||||||||||||||||||||||||||||||||||
| 506 | BIO * | - | ||||||||||||||||||||||||||||||||||||
| 507 | SSL_get_rbio(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 508 | { | - | ||||||||||||||||||||||||||||||||||||
| 509 | return executed 2613 times by 3 tests: (s->rbio);return (s->rbio);Executed by:
executed 2613 times by 3 tests: return (s->rbio);Executed by:
| 2613 | ||||||||||||||||||||||||||||||||||||
| 510 | } | - | ||||||||||||||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||||||||||||||
| 512 | BIO * | - | ||||||||||||||||||||||||||||||||||||
| 513 | SSL_get_wbio(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 514 | { | - | ||||||||||||||||||||||||||||||||||||
| 515 | return executed 755 times by 3 tests: (s->wbio);return (s->wbio);Executed by:
executed 755 times by 3 tests: return (s->wbio);Executed by:
| 755 | ||||||||||||||||||||||||||||||||||||
| 516 | } | - | ||||||||||||||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||||||||||||||
| 518 | int | - | ||||||||||||||||||||||||||||||||||||
| 519 | SSL_get_fd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 520 | { | - | ||||||||||||||||||||||||||||||||||||
| 521 | return never executed: (SSL_get_rfd(s));return (SSL_get_rfd(s));never executed: return (SSL_get_rfd(s)); | 0 | ||||||||||||||||||||||||||||||||||||
| 522 | } | - | ||||||||||||||||||||||||||||||||||||
| 523 | - | |||||||||||||||||||||||||||||||||||||
| 524 | int | - | ||||||||||||||||||||||||||||||||||||
| 525 | SSL_get_rfd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 526 | { | - | ||||||||||||||||||||||||||||||||||||
| 527 | int ret = -1; | - | ||||||||||||||||||||||||||||||||||||
| 528 | BIO *b, *r; | - | ||||||||||||||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||||||||||||||
| 530 | b = SSL_get_rbio(s); | - | ||||||||||||||||||||||||||||||||||||
| 531 | r = BIO_find_type(b, 0x0100); | - | ||||||||||||||||||||||||||||||||||||
| 532 | if (r !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 533 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 534 | ) | - | ||||||||||||||||||||||||||||||||||||
| 535 | BIO_ctrl(r,105,0,(char *)&ret); never executed: BIO_ctrl(r,105,0,(char *)&ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 536 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 537 | } | - | ||||||||||||||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||||||||||||||
| 539 | int | - | ||||||||||||||||||||||||||||||||||||
| 540 | SSL_get_wfd(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 541 | { | - | ||||||||||||||||||||||||||||||||||||
| 542 | int ret = -1; | - | ||||||||||||||||||||||||||||||||||||
| 543 | BIO *b, *r; | - | ||||||||||||||||||||||||||||||||||||
| 544 | - | |||||||||||||||||||||||||||||||||||||
| 545 | b = SSL_get_wbio(s); | - | ||||||||||||||||||||||||||||||||||||
| 546 | r = BIO_find_type(b, 0x0100); | - | ||||||||||||||||||||||||||||||||||||
| 547 | if (r !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 548 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 549 | ) | - | ||||||||||||||||||||||||||||||||||||
| 550 | BIO_ctrl(r,105,0,(char *)&ret); never executed: BIO_ctrl(r,105,0,(char *)&ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 551 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 552 | } | - | ||||||||||||||||||||||||||||||||||||
| 553 | - | |||||||||||||||||||||||||||||||||||||
| 554 | int | - | ||||||||||||||||||||||||||||||||||||
| 555 | SSL_set_fd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
| 556 | { | - | ||||||||||||||||||||||||||||||||||||
| 557 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
| 558 | BIO *bio = | - | ||||||||||||||||||||||||||||||||||||
| 559 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 560 | ; | - | ||||||||||||||||||||||||||||||||||||
| 561 | - | |||||||||||||||||||||||||||||||||||||
| 562 | bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
| 563 | - | |||||||||||||||||||||||||||||||||||||
| 564 | if (bio ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 565 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 566 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 567 | SSL_error_internal(s, 7, __FILE__, 646); | - | ||||||||||||||||||||||||||||||||||||
| 568 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 569 | } | - | ||||||||||||||||||||||||||||||||||||
| 570 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
| 571 | SSL_set_bio(s, bio, bio); | - | ||||||||||||||||||||||||||||||||||||
| 572 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
| 573 | err: code before this statement never executed: err: | 0 | ||||||||||||||||||||||||||||||||||||
| 574 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 575 | } | - | ||||||||||||||||||||||||||||||||||||
| 576 | - | |||||||||||||||||||||||||||||||||||||
| 577 | int | - | ||||||||||||||||||||||||||||||||||||
| 578 | SSL_set_wfd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
| 579 | { | - | ||||||||||||||||||||||||||||||||||||
| 580 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
| 581 | BIO *bio = | - | ||||||||||||||||||||||||||||||||||||
| 582 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 583 | ; | - | ||||||||||||||||||||||||||||||||||||
| 584 | - | |||||||||||||||||||||||||||||||||||||
| 585 | if ((
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 586 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 587 | )
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 588 | || ((
| 2 | ||||||||||||||||||||||||||||||||||||
| 589 | ((void *)0)
| 2 | ||||||||||||||||||||||||||||||||||||
| 590 | ) != fd)
| 2 | ||||||||||||||||||||||||||||||||||||
| 591 | bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
| 592 | - | |||||||||||||||||||||||||||||||||||||
| 593 | if (bio ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 594 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 595 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 596 | SSL_error_internal(s, 7, __FILE__, 667); | - | ||||||||||||||||||||||||||||||||||||
| 597 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 598 | } | - | ||||||||||||||||||||||||||||||||||||
| 599 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
| 600 | SSL_set_bio(s, SSL_get_rbio(s), bio); | - | ||||||||||||||||||||||||||||||||||||
| 601 | } executed 2 times by 1 test: elseend of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 602 | SSL_set_bio(s, SSL_get_rbio(s), SSL_get_rbio(s)); executed 2 times by 1 test: SSL_set_bio(s, SSL_get_rbio(s), SSL_get_rbio(s));Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 603 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
| 604 | err: code before this statement executed 4 times by 1 test: err:Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 605 | return executed 4 times by 1 test: (ret);return (ret);Executed by:
executed 4 times by 1 test: return (ret);Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 606 | } | - | ||||||||||||||||||||||||||||||||||||
| 607 | - | |||||||||||||||||||||||||||||||||||||
| 608 | int | - | ||||||||||||||||||||||||||||||||||||
| 609 | SSL_set_rfd(SSL *s, int fd) | - | ||||||||||||||||||||||||||||||||||||
| 610 | { | - | ||||||||||||||||||||||||||||||||||||
| 611 | int ret = 0; | - | ||||||||||||||||||||||||||||||||||||
| 612 | BIO *bio = | - | ||||||||||||||||||||||||||||||||||||
| 613 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 614 | ; | - | ||||||||||||||||||||||||||||||||||||
| 615 | - | |||||||||||||||||||||||||||||||||||||
| 616 | if ((
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 617 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 618 | )
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 619 | || ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 620 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 621 | ) != fd)
| 0 | ||||||||||||||||||||||||||||||||||||
| 622 | bio = BIO_new(BIO_s_socket()); | - | ||||||||||||||||||||||||||||||||||||
| 623 | - | |||||||||||||||||||||||||||||||||||||
| 624 | if (bio ==
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 625 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 626 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 627 | SSL_error_internal(s, 7, __FILE__, 690); | - | ||||||||||||||||||||||||||||||||||||
| 628 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 629 | } | - | ||||||||||||||||||||||||||||||||||||
| 630 | BIO_int_ctrl(bio,104,0x00,fd); | - | ||||||||||||||||||||||||||||||||||||
| 631 | SSL_set_bio(s, bio, SSL_get_wbio(s)); | - | ||||||||||||||||||||||||||||||||||||
| 632 | } executed 4 times by 1 test: elseend of blockExecuted by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 633 | SSL_set_bio(s, SSL_get_wbio(s), SSL_get_wbio(s)); never executed: SSL_set_bio(s, SSL_get_wbio(s), SSL_get_wbio(s)); | 0 | ||||||||||||||||||||||||||||||||||||
| 634 | ret = 1; | - | ||||||||||||||||||||||||||||||||||||
| 635 | err: code before this statement executed 4 times by 1 test: err:Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 636 | return executed 4 times by 1 test: (ret);return (ret);Executed by:
executed 4 times by 1 test: return (ret);Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 637 | } | - | ||||||||||||||||||||||||||||||||||||
| 638 | - | |||||||||||||||||||||||||||||||||||||
| 639 | - | |||||||||||||||||||||||||||||||||||||
| 640 | - | |||||||||||||||||||||||||||||||||||||
| 641 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 642 | SSL_get_finished(const SSL *s, void *buf, size_t count) | - | ||||||||||||||||||||||||||||||||||||
| 643 | { | - | ||||||||||||||||||||||||||||||||||||
| 644 | size_t ret = 0; | - | ||||||||||||||||||||||||||||||||||||
| 645 | - | |||||||||||||||||||||||||||||||||||||
| 646 | if (s->s3 !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 647 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 648 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 649 | ret = (s->s3->internal)->tmp.finish_md_len; | - | ||||||||||||||||||||||||||||||||||||
| 650 | if (count > ret
| 0 | ||||||||||||||||||||||||||||||||||||
| 651 | count = ret; never executed: count = ret; | 0 | ||||||||||||||||||||||||||||||||||||
| 652 | memcpy(buf, (s->s3->internal)->tmp.finish_md, count); | - | ||||||||||||||||||||||||||||||||||||
| 653 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 654 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 655 | } | - | ||||||||||||||||||||||||||||||||||||
| 656 | - | |||||||||||||||||||||||||||||||||||||
| 657 | - | |||||||||||||||||||||||||||||||||||||
| 658 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 659 | SSL_get_peer_finished(const SSL *s, void *buf, size_t count) | - | ||||||||||||||||||||||||||||||||||||
| 660 | { | - | ||||||||||||||||||||||||||||||||||||
| 661 | size_t ret = 0; | - | ||||||||||||||||||||||||||||||||||||
| 662 | - | |||||||||||||||||||||||||||||||||||||
| 663 | if (s->s3 !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 664 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 665 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 666 | ret = (s->s3->internal)->tmp.peer_finish_md_len; | - | ||||||||||||||||||||||||||||||||||||
| 667 | if (count > ret
| 0 | ||||||||||||||||||||||||||||||||||||
| 668 | count = ret; never executed: count = ret; | 0 | ||||||||||||||||||||||||||||||||||||
| 669 | memcpy(buf, (s->s3->internal)->tmp.peer_finish_md, count); | - | ||||||||||||||||||||||||||||||||||||
| 670 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 671 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 672 | } | - | ||||||||||||||||||||||||||||||||||||
| 673 | - | |||||||||||||||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||||||||||||||
| 675 | int | - | ||||||||||||||||||||||||||||||||||||
| 676 | SSL_get_verify_mode(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 677 | { | - | ||||||||||||||||||||||||||||||||||||
| 678 | return never executed: (s->verify_mode);return (s->verify_mode);never executed: return (s->verify_mode); | 0 | ||||||||||||||||||||||||||||||||||||
| 679 | } | - | ||||||||||||||||||||||||||||||||||||
| 680 | - | |||||||||||||||||||||||||||||||||||||
| 681 | int | - | ||||||||||||||||||||||||||||||||||||
| 682 | SSL_get_verify_depth(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 683 | { | - | ||||||||||||||||||||||||||||||||||||
| 684 | return never executed: (X509_VERIFY_PARAM_get_depth(s->param));return (X509_VERIFY_PARAM_get_depth(s->param));never executed: return (X509_VERIFY_PARAM_get_depth(s->param)); | 0 | ||||||||||||||||||||||||||||||||||||
| 685 | } | - | ||||||||||||||||||||||||||||||||||||
| 686 | - | |||||||||||||||||||||||||||||||||||||
| 687 | int | - | ||||||||||||||||||||||||||||||||||||
| 688 | (*SSL_get_verify_callback(const SSL *s))(int, X509_STORE_CTX *) | - | ||||||||||||||||||||||||||||||||||||
| 689 | { | - | ||||||||||||||||||||||||||||||||||||
| 690 | return never executed: (s->internal->verify_callback);return (s->internal->verify_callback);never executed: return (s->internal->verify_callback); | 0 | ||||||||||||||||||||||||||||||||||||
| 691 | } | - | ||||||||||||||||||||||||||||||||||||
| 692 | - | |||||||||||||||||||||||||||||||||||||
| 693 | int | - | ||||||||||||||||||||||||||||||||||||
| 694 | SSL_CTX_get_verify_mode(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 695 | { | - | ||||||||||||||||||||||||||||||||||||
| 696 | return never executed: (ctx->verify_mode);return (ctx->verify_mode);never executed: return (ctx->verify_mode); | 0 | ||||||||||||||||||||||||||||||||||||
| 697 | } | - | ||||||||||||||||||||||||||||||||||||
| 698 | - | |||||||||||||||||||||||||||||||||||||
| 699 | int | - | ||||||||||||||||||||||||||||||||||||
| 700 | SSL_CTX_get_verify_depth(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 701 | { | - | ||||||||||||||||||||||||||||||||||||
| 702 | return never executed: (X509_VERIFY_PARAM_get_depth(ctx->param));return (X509_VERIFY_PARAM_get_depth(ctx->param));never executed: return (X509_VERIFY_PARAM_get_depth(ctx->param)); | 0 | ||||||||||||||||||||||||||||||||||||
| 703 | } | - | ||||||||||||||||||||||||||||||||||||
| 704 | - | |||||||||||||||||||||||||||||||||||||
| 705 | int | - | ||||||||||||||||||||||||||||||||||||
| 706 | (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *) | - | ||||||||||||||||||||||||||||||||||||
| 707 | { | - | ||||||||||||||||||||||||||||||||||||
| 708 | return never executed: (ctx->internal->default_verify_callback);return (ctx->internal->default_verify_callback);never executed: return (ctx->internal->default_verify_callback); | 0 | ||||||||||||||||||||||||||||||||||||
| 709 | } | - | ||||||||||||||||||||||||||||||||||||
| 710 | - | |||||||||||||||||||||||||||||||||||||
| 711 | void | - | ||||||||||||||||||||||||||||||||||||
| 712 | SSL_set_verify(SSL *s, int mode, | - | ||||||||||||||||||||||||||||||||||||
| 713 | int (*callback)(int ok, X509_STORE_CTX *ctx)) | - | ||||||||||||||||||||||||||||||||||||
| 714 | { | - | ||||||||||||||||||||||||||||||||||||
| 715 | s->verify_mode = mode; | - | ||||||||||||||||||||||||||||||||||||
| 716 | if (callback !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 717 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 718 | ) | - | ||||||||||||||||||||||||||||||||||||
| 719 | s->internal->verify_callback = callback; never executed: s->internal->verify_callback = callback; | 0 | ||||||||||||||||||||||||||||||||||||
| 720 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 721 | - | |||||||||||||||||||||||||||||||||||||
| 722 | void | - | ||||||||||||||||||||||||||||||||||||
| 723 | SSL_set_verify_depth(SSL *s, int depth) | - | ||||||||||||||||||||||||||||||||||||
| 724 | { | - | ||||||||||||||||||||||||||||||||||||
| 725 | X509_VERIFY_PARAM_set_depth(s->param, depth); | - | ||||||||||||||||||||||||||||||||||||
| 726 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 727 | - | |||||||||||||||||||||||||||||||||||||
| 728 | void | - | ||||||||||||||||||||||||||||||||||||
| 729 | SSL_set_read_ahead(SSL *s, int yes) | - | ||||||||||||||||||||||||||||||||||||
| 730 | { | - | ||||||||||||||||||||||||||||||||||||
| 731 | s->internal->read_ahead = yes; | - | ||||||||||||||||||||||||||||||||||||
| 732 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 733 | - | |||||||||||||||||||||||||||||||||||||
| 734 | int | - | ||||||||||||||||||||||||||||||||||||
| 735 | SSL_get_read_ahead(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 736 | { | - | ||||||||||||||||||||||||||||||||||||
| 737 | return never executed: (s->internal->read_ahead);return (s->internal->read_ahead);never executed: return (s->internal->read_ahead); | 0 | ||||||||||||||||||||||||||||||||||||
| 738 | } | - | ||||||||||||||||||||||||||||||||||||
| 739 | - | |||||||||||||||||||||||||||||||||||||
| 740 | int | - | ||||||||||||||||||||||||||||||||||||
| 741 | SSL_pending(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 742 | { | - | ||||||||||||||||||||||||||||||||||||
| 743 | return executed 560 times by 1 test: (ssl3_pending(s));return (ssl3_pending(s));Executed by:
executed 560 times by 1 test: return (ssl3_pending(s));Executed by:
| 560 | ||||||||||||||||||||||||||||||||||||
| 744 | } | - | ||||||||||||||||||||||||||||||||||||
| 745 | - | |||||||||||||||||||||||||||||||||||||
| 746 | X509 * | - | ||||||||||||||||||||||||||||||||||||
| 747 | SSL_get_peer_certificate(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 748 | { | - | ||||||||||||||||||||||||||||||||||||
| 749 | X509 *r; | - | ||||||||||||||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||||||||||||||
| 751 | if ((
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 752 | ((void *)0)
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 753 | )
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 754 | ((void *)0)
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 755 | )
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 756 | r = never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 757 | ((void *)0) never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 758 | ; never executed: r = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 759 | else | - | ||||||||||||||||||||||||||||||||||||
| 760 | r = s->session->peer; executed 75 times by 2 tests: r = s->session->peer;Executed by:
| 75 | ||||||||||||||||||||||||||||||||||||
| 761 | - | |||||||||||||||||||||||||||||||||||||
| 762 | if (r ==
| 18-57 | ||||||||||||||||||||||||||||||||||||
| 763 | ((void *)0)
| 18-57 | ||||||||||||||||||||||||||||||||||||
| 764 | ) | - | ||||||||||||||||||||||||||||||||||||
| 765 | return executed 18 times by 2 tests: (r);return (r);Executed by:
executed 18 times by 2 tests: return (r);Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 766 | - | |||||||||||||||||||||||||||||||||||||
| 767 | CRYPTO_add_lock(&r->references,1,3,__FILE__,824); | - | ||||||||||||||||||||||||||||||||||||
| 768 | - | |||||||||||||||||||||||||||||||||||||
| 769 | return executed 57 times by 2 tests: (r);return (r);Executed by:
executed 57 times by 2 tests: return (r);Executed by:
| 57 | ||||||||||||||||||||||||||||||||||||
| 770 | } | - | ||||||||||||||||||||||||||||||||||||
| 771 | - | |||||||||||||||||||||||||||||||||||||
| 772 | struct stack_st_X509 * | - | ||||||||||||||||||||||||||||||||||||
| 773 | SSL_get_peer_cert_chain(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 774 | { | - | ||||||||||||||||||||||||||||||||||||
| 775 | struct stack_st_X509 *r; | - | ||||||||||||||||||||||||||||||||||||
| 776 | - | |||||||||||||||||||||||||||||||||||||
| 777 | if ((
| 0-16 | ||||||||||||||||||||||||||||||||||||
| 778 | ((void *)0)
| 0-16 | ||||||||||||||||||||||||||||||||||||
| 779 | )
| 0-16 | ||||||||||||||||||||||||||||||||||||
| 780 | ((void *)0)
| 0-16 | ||||||||||||||||||||||||||||||||||||
| 781 | )
| 0-16 | ||||||||||||||||||||||||||||||||||||
| 782 | ((
| 8 | ||||||||||||||||||||||||||||||||||||
| 783 | ((void *)0)
| 8 | ||||||||||||||||||||||||||||||||||||
| 784 | )
| 8 | ||||||||||||||||||||||||||||||||||||
| 785 | r = executed 8 times by 1 test: r = ((void *)0) ;Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 786 | ((void *)0) executed 8 times by 1 test: r = ((void *)0) ;Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 787 | ; executed 8 times by 1 test: r = ((void *)0) ;Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 788 | else | - | ||||||||||||||||||||||||||||||||||||
| 789 | r = (s->session->internal)->sess_cert->cert_chain; executed 8 times by 1 test: r = (s->session->internal)->sess_cert->cert_chain;Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 790 | - | |||||||||||||||||||||||||||||||||||||
| 791 | - | |||||||||||||||||||||||||||||||||||||
| 792 | - | |||||||||||||||||||||||||||||||||||||
| 793 | - | |||||||||||||||||||||||||||||||||||||
| 794 | - | |||||||||||||||||||||||||||||||||||||
| 795 | - | |||||||||||||||||||||||||||||||||||||
| 796 | return executed 16 times by 1 test: (r);return (r);Executed by:
executed 16 times by 1 test: return (r);Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 797 | } | - | ||||||||||||||||||||||||||||||||||||
| 798 | - | |||||||||||||||||||||||||||||||||||||
| 799 | - | |||||||||||||||||||||||||||||||||||||
| 800 | - | |||||||||||||||||||||||||||||||||||||
| 801 | - | |||||||||||||||||||||||||||||||||||||
| 802 | - | |||||||||||||||||||||||||||||||||||||
| 803 | int | - | ||||||||||||||||||||||||||||||||||||
| 804 | SSL_copy_session_id(SSL *t, const SSL *f) | - | ||||||||||||||||||||||||||||||||||||
| 805 | { | - | ||||||||||||||||||||||||||||||||||||
| 806 | CERT *tmp; | - | ||||||||||||||||||||||||||||||||||||
| 807 | - | |||||||||||||||||||||||||||||||||||||
| 808 | - | |||||||||||||||||||||||||||||||||||||
| 809 | if (!SSL_set_session(t, SSL_get_session(f))
| 0 | ||||||||||||||||||||||||||||||||||||
| 810 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 811 | - | |||||||||||||||||||||||||||||||||||||
| 812 | - | |||||||||||||||||||||||||||||||||||||
| 813 | if (t->method != f->method
| 0 | ||||||||||||||||||||||||||||||||||||
| 814 | t->method->internal->ssl_free(t); | - | ||||||||||||||||||||||||||||||||||||
| 815 | t->method = f->method; | - | ||||||||||||||||||||||||||||||||||||
| 816 | if (!t->method->internal->ssl_new(t)
| 0 | ||||||||||||||||||||||||||||||||||||
| 817 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 818 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 819 | - | |||||||||||||||||||||||||||||||||||||
| 820 | tmp = t->cert; | - | ||||||||||||||||||||||||||||||||||||
| 821 | if (f->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 822 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 823 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 824 | CRYPTO_add_lock(&f->cert->references,1,13,__FILE__,871); | - | ||||||||||||||||||||||||||||||||||||
| 825 | t->cert = f->cert; | - | ||||||||||||||||||||||||||||||||||||
| 826 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
| 827 | t->cert = never executed: t->cert = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 828 | ((void *)0) never executed: t->cert = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 829 | ; never executed: t->cert = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 830 | ssl_cert_free(tmp); | - | ||||||||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||||||||
| 832 | if (!SSL_set_session_id_context(t, f->sid_ctx, f->sid_ctx_length)
| 0 | ||||||||||||||||||||||||||||||||||||
| 833 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 834 | - | |||||||||||||||||||||||||||||||||||||
| 835 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 836 | } | - | ||||||||||||||||||||||||||||||||||||
| 837 | - | |||||||||||||||||||||||||||||||||||||
| 838 | - | |||||||||||||||||||||||||||||||||||||
| 839 | int | - | ||||||||||||||||||||||||||||||||||||
| 840 | SSL_CTX_check_private_key(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 841 | { | - | ||||||||||||||||||||||||||||||||||||
| 842 | if ((
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 843 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 844 | )
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 845 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 846 | )
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 847 | (
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 848 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 849 | )
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 850 | ERR_put_error(20,(0xfff),(177),__FILE__,889); | - | ||||||||||||||||||||||||||||||||||||
| 851 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 852 | } | - | ||||||||||||||||||||||||||||||||||||
| 853 | if (ctx->internal->cert->key->privatekey ==
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 854 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 855 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 856 | ERR_put_error(20,(0xfff),(190),__FILE__,893); | - | ||||||||||||||||||||||||||||||||||||
| 857 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 858 | } | - | ||||||||||||||||||||||||||||||||||||
| 859 | return executed 4 times by 1 test: (X509_check_private_key(ctx->internal->cert->key->x509,return (X509_check_private_key(ctx->internal->cert->key->x509, ctx->internal->cert->key->privatekey));Executed by:
executed 4 times by 1 test: return (X509_check_private_key(ctx->internal->cert->key->x509, ctx->internal->cert->key->privatekey));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 860 | ctx->internal->cert->key->privatekey)); executed 4 times by 1 test: return (X509_check_private_key(ctx->internal->cert->key->x509, ctx->internal->cert->key->privatekey));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 861 | } | - | ||||||||||||||||||||||||||||||||||||
| 862 | - | |||||||||||||||||||||||||||||||||||||
| 863 | - | |||||||||||||||||||||||||||||||||||||
| 864 | int | - | ||||||||||||||||||||||||||||||||||||
| 865 | SSL_check_private_key(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 866 | { | - | ||||||||||||||||||||||||||||||||||||
| 867 | if (ssl ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 868 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 869 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 870 | ERR_put_error(20,(0xfff),((3|64)),__FILE__,905); | - | ||||||||||||||||||||||||||||||||||||
| 871 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 872 | } | - | ||||||||||||||||||||||||||||||||||||
| 873 | if (ssl->cert ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 874 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 875 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 876 | SSL_error_internal(ssl, 177, __FILE__, 909); | - | ||||||||||||||||||||||||||||||||||||
| 877 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 878 | } | - | ||||||||||||||||||||||||||||||||||||
| 879 | if (ssl->cert->key->x509 ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 880 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 881 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 882 | SSL_error_internal(ssl, 177, __FILE__, 913); | - | ||||||||||||||||||||||||||||||||||||
| 883 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 884 | } | - | ||||||||||||||||||||||||||||||||||||
| 885 | if (ssl->cert->key->privatekey ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 886 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 887 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 888 | SSL_error_internal(ssl, 190, __FILE__, 917); | - | ||||||||||||||||||||||||||||||||||||
| 889 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 890 | } | - | ||||||||||||||||||||||||||||||||||||
| 891 | return never executed: (X509_check_private_key(ssl->cert->key->x509,return (X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey));never executed: return (X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey)); | 0 | ||||||||||||||||||||||||||||||||||||
| 892 | ssl->cert->key->privatekey)); never executed: return (X509_check_private_key(ssl->cert->key->x509, ssl->cert->key->privatekey)); | 0 | ||||||||||||||||||||||||||||||||||||
| 893 | } | - | ||||||||||||||||||||||||||||||||||||
| 894 | - | |||||||||||||||||||||||||||||||||||||
| 895 | int | - | ||||||||||||||||||||||||||||||||||||
| 896 | SSL_accept(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 897 | { | - | ||||||||||||||||||||||||||||||||||||
| 898 | if (s->internal->handshake_func ==
| 6-8 | ||||||||||||||||||||||||||||||||||||
| 899 | ((void *)0)
| 6-8 | ||||||||||||||||||||||||||||||||||||
| 900 | ) | - | ||||||||||||||||||||||||||||||||||||
| 901 | SSL_set_accept_state(s); executed 6 times by 2 tests: SSL_set_accept_state(s);Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
| 902 | - | |||||||||||||||||||||||||||||||||||||
| 903 | return executed 14 times by 2 tests: (s->method->internal->ssl_accept(s));return (s->method->internal->ssl_accept(s));Executed by:
executed 14 times by 2 tests: return (s->method->internal->ssl_accept(s));Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||
| 904 | } | - | ||||||||||||||||||||||||||||||||||||
| 905 | - | |||||||||||||||||||||||||||||||||||||
| 906 | int | - | ||||||||||||||||||||||||||||||||||||
| 907 | SSL_connect(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 908 | { | - | ||||||||||||||||||||||||||||||||||||
| 909 | if (s->internal->handshake_func ==
| 12-15 | ||||||||||||||||||||||||||||||||||||
| 910 | ((void *)0)
| 12-15 | ||||||||||||||||||||||||||||||||||||
| 911 | ) | - | ||||||||||||||||||||||||||||||||||||
| 912 | SSL_set_connect_state(s); executed 15 times by 2 tests: SSL_set_connect_state(s);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 913 | - | |||||||||||||||||||||||||||||||||||||
| 914 | return executed 27 times by 2 tests: (s->method->internal->ssl_connect(s));return (s->method->internal->ssl_connect(s));Executed by:
executed 27 times by 2 tests: return (s->method->internal->ssl_connect(s));Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||
| 915 | } | - | ||||||||||||||||||||||||||||||||||||
| 916 | - | |||||||||||||||||||||||||||||||||||||
| 917 | int | - | ||||||||||||||||||||||||||||||||||||
| 918 | SSL_is_server(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 919 | { | - | ||||||||||||||||||||||||||||||||||||
| 920 | return never executed: s->server;return s->server;never executed: return s->server; | 0 | ||||||||||||||||||||||||||||||||||||
| 921 | } | - | ||||||||||||||||||||||||||||||||||||
| 922 | - | |||||||||||||||||||||||||||||||||||||
| 923 | long | - | ||||||||||||||||||||||||||||||||||||
| 924 | SSL_get_default_timeout(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 925 | { | - | ||||||||||||||||||||||||||||||||||||
| 926 | return never executed: (s->method->internal->get_timeout());return (s->method->internal->get_timeout());never executed: return (s->method->internal->get_timeout()); | 0 | ||||||||||||||||||||||||||||||||||||
| 927 | } | - | ||||||||||||||||||||||||||||||||||||
| 928 | - | |||||||||||||||||||||||||||||||||||||
| 929 | int | - | ||||||||||||||||||||||||||||||||||||
| 930 | SSL_read(SSL *s, void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
| 931 | { | - | ||||||||||||||||||||||||||||||||||||
| 932 | if (s->internal->handshake_func ==
| 0-1598 | ||||||||||||||||||||||||||||||||||||
| 933 | ((void *)0)
| 0-1598 | ||||||||||||||||||||||||||||||||||||
| 934 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 935 | SSL_error_internal(s, 276, __FILE__, 958); | - | ||||||||||||||||||||||||||||||||||||
| 936 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 937 | } | - | ||||||||||||||||||||||||||||||||||||
| 938 | - | |||||||||||||||||||||||||||||||||||||
| 939 | if (s->internal->shutdown & 2
| 0-1598 | ||||||||||||||||||||||||||||||||||||
| 940 | s->internal->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
| 941 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 942 | } | - | ||||||||||||||||||||||||||||||||||||
| 943 | return executed 1598 times by 1 test: ssl3_read(s, buf, num);return ssl3_read(s, buf, num);Executed by:
executed 1598 times by 1 test: return ssl3_read(s, buf, num);Executed by:
| 1598 | ||||||||||||||||||||||||||||||||||||
| 944 | } | - | ||||||||||||||||||||||||||||||||||||
| 945 | - | |||||||||||||||||||||||||||||||||||||
| 946 | int | - | ||||||||||||||||||||||||||||||||||||
| 947 | SSL_peek(SSL *s, void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
| 948 | { | - | ||||||||||||||||||||||||||||||||||||
| 949 | if (s->internal->handshake_func ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 950 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 951 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 952 | SSL_error_internal(s, 276, __FILE__, 973); | - | ||||||||||||||||||||||||||||||||||||
| 953 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 954 | } | - | ||||||||||||||||||||||||||||||||||||
| 955 | - | |||||||||||||||||||||||||||||||||||||
| 956 | if (s->internal->shutdown & 2
| 0 | ||||||||||||||||||||||||||||||||||||
| 957 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 958 | } | - | ||||||||||||||||||||||||||||||||||||
| 959 | return never executed: ssl3_peek(s, buf, num);return ssl3_peek(s, buf, num);never executed: return ssl3_peek(s, buf, num); | 0 | ||||||||||||||||||||||||||||||||||||
| 960 | } | - | ||||||||||||||||||||||||||||||||||||
| 961 | - | |||||||||||||||||||||||||||||||||||||
| 962 | int | - | ||||||||||||||||||||||||||||||||||||
| 963 | SSL_write(SSL *s, const void *buf, int num) | - | ||||||||||||||||||||||||||||||||||||
| 964 | { | - | ||||||||||||||||||||||||||||||||||||
| 965 | if (s->internal->handshake_func ==
| 0-1526 | ||||||||||||||||||||||||||||||||||||
| 966 | ((void *)0)
| 0-1526 | ||||||||||||||||||||||||||||||||||||
| 967 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 968 | SSL_error_internal(s, 276, __FILE__, 987); | - | ||||||||||||||||||||||||||||||||||||
| 969 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 970 | } | - | ||||||||||||||||||||||||||||||||||||
| 971 | - | |||||||||||||||||||||||||||||||||||||
| 972 | if (s->internal->shutdown & 1
| 0-1526 | ||||||||||||||||||||||||||||||||||||
| 973 | s->internal->rwstate = 1; | - | ||||||||||||||||||||||||||||||||||||
| 974 | SSL_error_internal(s, 207, __FILE__, 993); | - | ||||||||||||||||||||||||||||||||||||
| 975 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 976 | } | - | ||||||||||||||||||||||||||||||||||||
| 977 | return executed 1526 times by 1 test: ssl3_write(s, buf, num);return ssl3_write(s, buf, num);Executed by:
executed 1526 times by 1 test: return ssl3_write(s, buf, num);Executed by:
| 1526 | ||||||||||||||||||||||||||||||||||||
| 978 | } | - | ||||||||||||||||||||||||||||||||||||
| 979 | - | |||||||||||||||||||||||||||||||||||||
| 980 | int | - | ||||||||||||||||||||||||||||||||||||
| 981 | SSL_shutdown(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 982 | { | - | ||||||||||||||||||||||||||||||||||||
| 983 | - | |||||||||||||||||||||||||||||||||||||
| 984 | - | |||||||||||||||||||||||||||||||||||||
| 985 | - | |||||||||||||||||||||||||||||||||||||
| 986 | - | |||||||||||||||||||||||||||||||||||||
| 987 | - | |||||||||||||||||||||||||||||||||||||
| 988 | - | |||||||||||||||||||||||||||||||||||||
| 989 | - | |||||||||||||||||||||||||||||||||||||
| 990 | if (s->internal->handshake_func ==
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 991 | ((void *)0)
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 992 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 993 | SSL_error_internal(s, 276, __FILE__, 1010); | - | ||||||||||||||||||||||||||||||||||||
| 994 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 995 | } | - | ||||||||||||||||||||||||||||||||||||
| 996 | - | |||||||||||||||||||||||||||||||||||||
| 997 | if (s !=
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 998 | ((void *)0)
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 999 | && !(SSL_state((s))&(0x1000|0x2000))
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 1000 | return executed 126 times by 2 tests: (ssl3_shutdown(s));return (ssl3_shutdown(s));Executed by:
executed 126 times by 2 tests: return (ssl3_shutdown(s));Executed by:
| 126 | ||||||||||||||||||||||||||||||||||||
| 1001 | - | |||||||||||||||||||||||||||||||||||||
| 1002 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1003 | } | - | ||||||||||||||||||||||||||||||||||||
| 1004 | - | |||||||||||||||||||||||||||||||||||||
| 1005 | int | - | ||||||||||||||||||||||||||||||||||||
| 1006 | SSL_renegotiate(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1007 | { | - | ||||||||||||||||||||||||||||||||||||
| 1008 | if (s->internal->renegotiate == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 1009 | s->internal->renegotiate = 1; executed 1 time by 1 test: s->internal->renegotiate = 1;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 1010 | - | |||||||||||||||||||||||||||||||||||||
| 1011 | s->internal->new_session = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1012 | - | |||||||||||||||||||||||||||||||||||||
| 1013 | return executed 1 time by 1 test: (s->method->internal->ssl_renegotiate(s));return (s->method->internal->ssl_renegotiate(s));Executed by:
executed 1 time by 1 test: return (s->method->internal->ssl_renegotiate(s));Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 1014 | } | - | ||||||||||||||||||||||||||||||||||||
| 1015 | - | |||||||||||||||||||||||||||||||||||||
| 1016 | int | - | ||||||||||||||||||||||||||||||||||||
| 1017 | SSL_renegotiate_abbreviated(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1018 | { | - | ||||||||||||||||||||||||||||||||||||
| 1019 | if (s->internal->renegotiate == 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 1020 | s->internal->renegotiate = 1; never executed: s->internal->renegotiate = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 1021 | - | |||||||||||||||||||||||||||||||||||||
| 1022 | s->internal->new_session = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1023 | - | |||||||||||||||||||||||||||||||||||||
| 1024 | return never executed: (s->method->internal->ssl_renegotiate(s));return (s->method->internal->ssl_renegotiate(s));never executed: return (s->method->internal->ssl_renegotiate(s)); | 0 | ||||||||||||||||||||||||||||||||||||
| 1025 | } | - | ||||||||||||||||||||||||||||||||||||
| 1026 | - | |||||||||||||||||||||||||||||||||||||
| 1027 | int | - | ||||||||||||||||||||||||||||||||||||
| 1028 | SSL_renegotiate_pending(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1029 | { | - | ||||||||||||||||||||||||||||||||||||
| 1030 | - | |||||||||||||||||||||||||||||||||||||
| 1031 | - | |||||||||||||||||||||||||||||||||||||
| 1032 | - | |||||||||||||||||||||||||||||||||||||
| 1033 | - | |||||||||||||||||||||||||||||||||||||
| 1034 | return never executed: (s->internal->renegotiate != 0);return (s->internal->renegotiate != 0);never executed: return (s->internal->renegotiate != 0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1035 | } | - | ||||||||||||||||||||||||||||||||||||
| 1036 | - | |||||||||||||||||||||||||||||||||||||
| 1037 | long | - | ||||||||||||||||||||||||||||||||||||
| 1038 | SSL_ctrl(SSL *s, int cmd, long larg, void *parg) | - | ||||||||||||||||||||||||||||||||||||
| 1039 | { | - | ||||||||||||||||||||||||||||||||||||
| 1040 | long l; | - | ||||||||||||||||||||||||||||||||||||
| 1041 | - | |||||||||||||||||||||||||||||||||||||
| 1042 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
| 1043 | case never executed: 40:case 40:never executed: case 40: | 0 | ||||||||||||||||||||||||||||||||||||
| 1044 | return never executed: (s->internal->read_ahead);return (s->internal->read_ahead);never executed: return (s->internal->read_ahead); | 0 | ||||||||||||||||||||||||||||||||||||
| 1045 | case never executed: 41:case 41:never executed: case 41: | 0 | ||||||||||||||||||||||||||||||||||||
| 1046 | l = s->internal->read_ahead; | - | ||||||||||||||||||||||||||||||||||||
| 1047 | s->internal->read_ahead = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1048 | return never executed: (l);return (l);never executed: return (l); | 0 | ||||||||||||||||||||||||||||||||||||
| 1049 | - | |||||||||||||||||||||||||||||||||||||
| 1050 | case never executed: 16:case 16:never executed: case 16: | 0 | ||||||||||||||||||||||||||||||||||||
| 1051 | s->internal->msg_callback_arg = parg; | - | ||||||||||||||||||||||||||||||||||||
| 1052 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1053 | - | |||||||||||||||||||||||||||||||||||||
| 1054 | case executed 450 times by 7 tests: 32:case 32:Executed by:
executed 450 times by 7 tests: case 32:Executed by:
| 450 | ||||||||||||||||||||||||||||||||||||
| 1055 | return executed 450 times by 7 tests: (s->internal->options|=larg);return (s->internal->options|=larg);Executed by:
executed 450 times by 7 tests: return (s->internal->options|=larg);Executed by:
| 450 | ||||||||||||||||||||||||||||||||||||
| 1056 | case executed 35 times by 2 tests: 77:case 77:Executed by:
executed 35 times by 2 tests: case 77:Executed by:
| 35 | ||||||||||||||||||||||||||||||||||||
| 1057 | return executed 35 times by 2 tests: (s->internal->options&=~larg);return (s->internal->options&=~larg);Executed by:
executed 35 times by 2 tests: return (s->internal->options&=~larg);Executed by:
| 35 | ||||||||||||||||||||||||||||||||||||
| 1058 | case never executed: 33:case 33:never executed: case 33: | 0 | ||||||||||||||||||||||||||||||||||||
| 1059 | return never executed: (s->internal->mode|=larg);return (s->internal->mode|=larg);never executed: return (s->internal->mode|=larg); | 0 | ||||||||||||||||||||||||||||||||||||
| 1060 | case never executed: 78:case 78:never executed: case 78: | 0 | ||||||||||||||||||||||||||||||||||||
| 1061 | return never executed: (s->internal->mode &=~larg);return (s->internal->mode &=~larg);never executed: return (s->internal->mode &=~larg); | 0 | ||||||||||||||||||||||||||||||||||||
| 1062 | case never executed: 50:case 50:never executed: case 50: | 0 | ||||||||||||||||||||||||||||||||||||
| 1063 | return never executed: (s->internal->max_cert_list);return (s->internal->max_cert_list);never executed: return (s->internal->max_cert_list); | 0 | ||||||||||||||||||||||||||||||||||||
| 1064 | case never executed: 51:case 51:never executed: case 51: | 0 | ||||||||||||||||||||||||||||||||||||
| 1065 | l = s->internal->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
| 1066 | s->internal->max_cert_list = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1067 | return never executed: (l);return (l);never executed: return (l); | 0 | ||||||||||||||||||||||||||||||||||||
| 1068 | case never executed: 17:case 17:never executed: case 17: | 0 | ||||||||||||||||||||||||||||||||||||
| 1069 | - | |||||||||||||||||||||||||||||||||||||
| 1070 | if (larg < (long)dtls1_min_mtu()
| 0 | ||||||||||||||||||||||||||||||||||||
| 1071 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1072 | - | |||||||||||||||||||||||||||||||||||||
| 1073 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 1074 | (s->d1->internal)->mtu = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1075 | return never executed: (larg);return (larg);never executed: return (larg); | 0 | ||||||||||||||||||||||||||||||||||||
| 1076 | } | - | ||||||||||||||||||||||||||||||||||||
| 1077 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1078 | case never executed: 52:case 52:never executed: case 52: | 0 | ||||||||||||||||||||||||||||||||||||
| 1079 | if (larg < 512
| 0 | ||||||||||||||||||||||||||||||||||||
| 1080 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1081 | s->max_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1082 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1083 | case never executed: 76:case 76:never executed: case 76: | 0 | ||||||||||||||||||||||||||||||||||||
| 1084 | if (s->s3
| 0 | ||||||||||||||||||||||||||||||||||||
| 1085 | return never executed: ((s->s3->internal)->send_connection_binding);return ((s->s3->internal)->send_connection_binding);never executed: return ((s->s3->internal)->send_connection_binding); | 0 | ||||||||||||||||||||||||||||||||||||
| 1086 | else return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1087 | default executed 23 times by 2 tests: :default:Executed by:
executed 23 times by 2 tests: default:Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||
| 1088 | if ((
| 0-23 | ||||||||||||||||||||||||||||||||||||
| 1089 | return never executed: dtls1_ctrl(s, cmd, larg, parg);return dtls1_ctrl(s, cmd, larg, parg);never executed: return dtls1_ctrl(s, cmd, larg, parg); | 0 | ||||||||||||||||||||||||||||||||||||
| 1090 | return executed 23 times by 2 tests: ssl3_ctrl(s, cmd, larg, parg);return ssl3_ctrl(s, cmd, larg, parg);Executed by:
executed 23 times by 2 tests: return ssl3_ctrl(s, cmd, larg, parg);Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||
| 1091 | } | - | ||||||||||||||||||||||||||||||||||||
| 1092 | } | - | ||||||||||||||||||||||||||||||||||||
| 1093 | - | |||||||||||||||||||||||||||||||||||||
| 1094 | long | - | ||||||||||||||||||||||||||||||||||||
| 1095 | SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) | - | ||||||||||||||||||||||||||||||||||||
| 1096 | { | - | ||||||||||||||||||||||||||||||||||||
| 1097 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
| 1098 | case never executed: 15:case 15:never executed: case 15: | 0 | ||||||||||||||||||||||||||||||||||||
| 1099 | s->internal->msg_callback = (void (*)(int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
| 1100 | int content_type, const void *buf, size_t len, | - | ||||||||||||||||||||||||||||||||||||
| 1101 | SSL *ssl, void *arg))(fp); | - | ||||||||||||||||||||||||||||||||||||
| 1102 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1103 | - | |||||||||||||||||||||||||||||||||||||
| 1104 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
| 1105 | return never executed: (ssl3_callback_ctrl(s, cmd, fp));return (ssl3_callback_ctrl(s, cmd, fp));never executed: return (ssl3_callback_ctrl(s, cmd, fp)); | 0 | ||||||||||||||||||||||||||||||||||||
| 1106 | } | - | ||||||||||||||||||||||||||||||||||||
| 1107 | } | - | ||||||||||||||||||||||||||||||||||||
| 1108 | - | |||||||||||||||||||||||||||||||||||||
| 1109 | struct lhash_st_SSL_SESSION * | - | ||||||||||||||||||||||||||||||||||||
| 1110 | SSL_CTX_sessions(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1111 | { | - | ||||||||||||||||||||||||||||||||||||
| 1112 | return never executed: (ctx->internal->sessions);return (ctx->internal->sessions);never executed: return (ctx->internal->sessions); | 0 | ||||||||||||||||||||||||||||||||||||
| 1113 | } | - | ||||||||||||||||||||||||||||||||||||
| 1114 | - | |||||||||||||||||||||||||||||||||||||
| 1115 | long | - | ||||||||||||||||||||||||||||||||||||
| 1116 | SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) | - | ||||||||||||||||||||||||||||||||||||
| 1117 | { | - | ||||||||||||||||||||||||||||||||||||
| 1118 | long l; | - | ||||||||||||||||||||||||||||||||||||
| 1119 | - | |||||||||||||||||||||||||||||||||||||
| 1120 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
| 1121 | case never executed: 40:case 40:never executed: case 40: | 0 | ||||||||||||||||||||||||||||||||||||
| 1122 | return never executed: (ctx->internal->read_ahead);return (ctx->internal->read_ahead);never executed: return (ctx->internal->read_ahead); | 0 | ||||||||||||||||||||||||||||||||||||
| 1123 | case never executed: 41:case 41:never executed: case 41: | 0 | ||||||||||||||||||||||||||||||||||||
| 1124 | l = ctx->internal->read_ahead; | - | ||||||||||||||||||||||||||||||||||||
| 1125 | ctx->internal->read_ahead = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1126 | return never executed: (l);return (l);never executed: return (l); | 0 | ||||||||||||||||||||||||||||||||||||
| 1127 | - | |||||||||||||||||||||||||||||||||||||
| 1128 | case never executed: 16:case 16:never executed: case 16: | 0 | ||||||||||||||||||||||||||||||||||||
| 1129 | ctx->internal->msg_callback_arg = parg; | - | ||||||||||||||||||||||||||||||||||||
| 1130 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1131 | - | |||||||||||||||||||||||||||||||||||||
| 1132 | case never executed: 50:case 50:never executed: case 50: | 0 | ||||||||||||||||||||||||||||||||||||
| 1133 | return never executed: (ctx->internal->max_cert_list);return (ctx->internal->max_cert_list);never executed: return (ctx->internal->max_cert_list); | 0 | ||||||||||||||||||||||||||||||||||||
| 1134 | case never executed: 51:case 51:never executed: case 51: | 0 | ||||||||||||||||||||||||||||||||||||
| 1135 | l = ctx->internal->max_cert_list; | - | ||||||||||||||||||||||||||||||||||||
| 1136 | ctx->internal->max_cert_list = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1137 | return never executed: (l);return (l);never executed: return (l); | 0 | ||||||||||||||||||||||||||||||||||||
| 1138 | - | |||||||||||||||||||||||||||||||||||||
| 1139 | case never executed: 42:case 42:never executed: case 42: | 0 | ||||||||||||||||||||||||||||||||||||
| 1140 | l = ctx->internal->session_cache_size; | - | ||||||||||||||||||||||||||||||||||||
| 1141 | ctx->internal->session_cache_size = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1142 | return never executed: (l);return (l);never executed: return (l); | 0 | ||||||||||||||||||||||||||||||||||||
| 1143 | case never executed: 43:case 43:never executed: case 43: | 0 | ||||||||||||||||||||||||||||||||||||
| 1144 | return never executed: (ctx->internal->session_cache_size);return (ctx->internal->session_cache_size);never executed: return (ctx->internal->session_cache_size); | 0 | ||||||||||||||||||||||||||||||||||||
| 1145 | case executed 8 times by 1 test: 44:case 44:Executed by:
executed 8 times by 1 test: case 44:Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 1146 | l = ctx->internal->session_cache_mode; | - | ||||||||||||||||||||||||||||||||||||
| 1147 | ctx->internal->session_cache_mode = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1148 | return executed 8 times by 1 test: (l);return (l);Executed by:
executed 8 times by 1 test: return (l);Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 1149 | case never executed: 45:case 45:never executed: case 45: | 0 | ||||||||||||||||||||||||||||||||||||
| 1150 | return never executed: (ctx->internal->session_cache_mode);return (ctx->internal->session_cache_mode);never executed: return (ctx->internal->session_cache_mode); | 0 | ||||||||||||||||||||||||||||||||||||
| 1151 | - | |||||||||||||||||||||||||||||||||||||
| 1152 | case never executed: 20:case 20:never executed: case 20: | 0 | ||||||||||||||||||||||||||||||||||||
| 1153 | return never executed: (lh_num_items(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0)))));return (lh_num_items(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0)))));never executed: return (lh_num_items(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0))))); | 0 | ||||||||||||||||||||||||||||||||||||
| 1154 | case never executed: 21:case 21:never executed: case 21: | 0 | ||||||||||||||||||||||||||||||||||||
| 1155 | return never executed: (ctx->internal->stats.sess_connect);return (ctx->internal->stats.sess_connect);never executed: return (ctx->internal->stats.sess_connect); | 0 | ||||||||||||||||||||||||||||||||||||
| 1156 | case never executed: 22:case 22:never executed: case 22: | 0 | ||||||||||||||||||||||||||||||||||||
| 1157 | return never executed: (ctx->internal->stats.sess_connect_good);return (ctx->internal->stats.sess_connect_good);never executed: return (ctx->internal->stats.sess_connect_good); | 0 | ||||||||||||||||||||||||||||||||||||
| 1158 | case never executed: 23:case 23:never executed: case 23: | 0 | ||||||||||||||||||||||||||||||||||||
| 1159 | return never executed: (ctx->internal->stats.sess_connect_renegotiate);return (ctx->internal->stats.sess_connect_renegotiate);never executed: return (ctx->internal->stats.sess_connect_renegotiate); | 0 | ||||||||||||||||||||||||||||||||||||
| 1160 | case never executed: 24:case 24:never executed: case 24: | 0 | ||||||||||||||||||||||||||||||||||||
| 1161 | return never executed: (ctx->internal->stats.sess_accept);return (ctx->internal->stats.sess_accept);never executed: return (ctx->internal->stats.sess_accept); | 0 | ||||||||||||||||||||||||||||||||||||
| 1162 | case never executed: 25:case 25:never executed: case 25: | 0 | ||||||||||||||||||||||||||||||||||||
| 1163 | return never executed: (ctx->internal->stats.sess_accept_good);return (ctx->internal->stats.sess_accept_good);never executed: return (ctx->internal->stats.sess_accept_good); | 0 | ||||||||||||||||||||||||||||||||||||
| 1164 | case never executed: 26:case 26:never executed: case 26: | 0 | ||||||||||||||||||||||||||||||||||||
| 1165 | return never executed: (ctx->internal->stats.sess_accept_renegotiate);return (ctx->internal->stats.sess_accept_renegotiate);never executed: return (ctx->internal->stats.sess_accept_renegotiate); | 0 | ||||||||||||||||||||||||||||||||||||
| 1166 | case never executed: 27:case 27:never executed: case 27: | 0 | ||||||||||||||||||||||||||||||||||||
| 1167 | return never executed: (ctx->internal->stats.sess_hit);return (ctx->internal->stats.sess_hit);never executed: return (ctx->internal->stats.sess_hit); | 0 | ||||||||||||||||||||||||||||||||||||
| 1168 | case never executed: 28:case 28:never executed: case 28: | 0 | ||||||||||||||||||||||||||||||||||||
| 1169 | return never executed: (ctx->internal->stats.sess_cb_hit);return (ctx->internal->stats.sess_cb_hit);never executed: return (ctx->internal->stats.sess_cb_hit); | 0 | ||||||||||||||||||||||||||||||||||||
| 1170 | case never executed: 29:case 29:never executed: case 29: | 0 | ||||||||||||||||||||||||||||||||||||
| 1171 | return never executed: (ctx->internal->stats.sess_miss);return (ctx->internal->stats.sess_miss);never executed: return (ctx->internal->stats.sess_miss); | 0 | ||||||||||||||||||||||||||||||||||||
| 1172 | case never executed: 30:case 30:never executed: case 30: | 0 | ||||||||||||||||||||||||||||||||||||
| 1173 | return never executed: (ctx->internal->stats.sess_timeout);return (ctx->internal->stats.sess_timeout);never executed: return (ctx->internal->stats.sess_timeout); | 0 | ||||||||||||||||||||||||||||||||||||
| 1174 | case never executed: 31:case 31:never executed: case 31: | 0 | ||||||||||||||||||||||||||||||||||||
| 1175 | return never executed: (ctx->internal->stats.sess_cache_full);return (ctx->internal->stats.sess_cache_full);never executed: return (ctx->internal->stats.sess_cache_full); | 0 | ||||||||||||||||||||||||||||||||||||
| 1176 | case executed 112 times by 4 tests: 32:case 32:Executed by:
executed 112 times by 4 tests: case 32:Executed by:
| 112 | ||||||||||||||||||||||||||||||||||||
| 1177 | return executed 112 times by 4 tests: (ctx->internal->options|=larg);return (ctx->internal->options|=larg);Executed by:
executed 112 times by 4 tests: return (ctx->internal->options|=larg);Executed by:
| 112 | ||||||||||||||||||||||||||||||||||||
| 1178 | case executed 24 times by 1 test: 77:case 77:Executed by:
executed 24 times by 1 test: case 77:Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 1179 | return executed 24 times by 1 test: (ctx->internal->options&=~larg);return (ctx->internal->options&=~larg);Executed by:
executed 24 times by 1 test: return (ctx->internal->options&=~larg);Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 1180 | case executed 16 times by 1 test: 33:case 33:Executed by:
executed 16 times by 1 test: case 33:Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 1181 | return executed 16 times by 1 test: (ctx->internal->mode|=larg);return (ctx->internal->mode|=larg);Executed by:
executed 16 times by 1 test: return (ctx->internal->mode|=larg);Executed by:
| 16 | ||||||||||||||||||||||||||||||||||||
| 1182 | case never executed: 78:case 78:never executed: case 78: | 0 | ||||||||||||||||||||||||||||||||||||
| 1183 | return never executed: (ctx->internal->mode&=~larg);return (ctx->internal->mode&=~larg);never executed: return (ctx->internal->mode&=~larg); | 0 | ||||||||||||||||||||||||||||||||||||
| 1184 | case never executed: 52:case 52:never executed: case 52: | 0 | ||||||||||||||||||||||||||||||||||||
| 1185 | if (larg < 512
| 0 | ||||||||||||||||||||||||||||||||||||
| 1186 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1187 | ctx->internal->max_send_fragment = larg; | - | ||||||||||||||||||||||||||||||||||||
| 1188 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1189 | default executed 110 times by 3 tests: :default:Executed by:
executed 110 times by 3 tests: default:Executed by:
| 110 | ||||||||||||||||||||||||||||||||||||
| 1190 | return executed 110 times by 3 tests: (ssl3_ctx_ctrl(ctx, cmd, larg, parg));return (ssl3_ctx_ctrl(ctx, cmd, larg, parg));Executed by:
executed 110 times by 3 tests: return (ssl3_ctx_ctrl(ctx, cmd, larg, parg));Executed by:
| 110 | ||||||||||||||||||||||||||||||||||||
| 1191 | } | - | ||||||||||||||||||||||||||||||||||||
| 1192 | } | - | ||||||||||||||||||||||||||||||||||||
| 1193 | - | |||||||||||||||||||||||||||||||||||||
| 1194 | long | - | ||||||||||||||||||||||||||||||||||||
| 1195 | SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) | - | ||||||||||||||||||||||||||||||||||||
| 1196 | { | - | ||||||||||||||||||||||||||||||||||||
| 1197 | switch (cmd) { | - | ||||||||||||||||||||||||||||||||||||
| 1198 | case never executed: 15:case 15:never executed: case 15: | 0 | ||||||||||||||||||||||||||||||||||||
| 1199 | ctx->internal->msg_callback = (void (*)(int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
| 1200 | int content_type, const void *buf, size_t len, SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
| 1201 | void *arg))(fp); | - | ||||||||||||||||||||||||||||||||||||
| 1202 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1203 | - | |||||||||||||||||||||||||||||||||||||
| 1204 | default executed 62 times by 2 tests: :default:Executed by:
executed 62 times by 2 tests: default:Executed by:
| 62 | ||||||||||||||||||||||||||||||||||||
| 1205 | return executed 62 times by 2 tests: (ssl3_ctx_callback_ctrl(ctx, cmd, fp));return (ssl3_ctx_callback_ctrl(ctx, cmd, fp));Executed by:
executed 62 times by 2 tests: return (ssl3_ctx_callback_ctrl(ctx, cmd, fp));Executed by:
| 62 | ||||||||||||||||||||||||||||||||||||
| 1206 | } | - | ||||||||||||||||||||||||||||||||||||
| 1207 | } | - | ||||||||||||||||||||||||||||||||||||
| 1208 | - | |||||||||||||||||||||||||||||||||||||
| 1209 | int | - | ||||||||||||||||||||||||||||||||||||
| 1210 | ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) | - | ||||||||||||||||||||||||||||||||||||
| 1211 | { | - | ||||||||||||||||||||||||||||||||||||
| 1212 | long l; | - | ||||||||||||||||||||||||||||||||||||
| 1213 | - | |||||||||||||||||||||||||||||||||||||
| 1214 | l = a->id - b->id; | - | ||||||||||||||||||||||||||||||||||||
| 1215 | if (l == 0L
| 1726-7609 | ||||||||||||||||||||||||||||||||||||
| 1216 | return executed 1726 times by 7 tests: (0);return (0);Executed by:
executed 1726 times by 7 tests: return (0);Executed by:
| 1726 | ||||||||||||||||||||||||||||||||||||
| 1217 | else | - | ||||||||||||||||||||||||||||||||||||
| 1218 | return executed 7609 times by 7 tests: ((return ((l > 0) ? 1:-1);Executed by:
executed 7609 times by 7 tests: return ((l > 0) ? 1:-1);Executed by:
| 3565-7609 | ||||||||||||||||||||||||||||||||||||
| 1219 | } | - | ||||||||||||||||||||||||||||||||||||
| 1220 | - | |||||||||||||||||||||||||||||||||||||
| 1221 | int | - | ||||||||||||||||||||||||||||||||||||
| 1222 | ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap, | - | ||||||||||||||||||||||||||||||||||||
| 1223 | const SSL_CIPHER * const *bp) | - | ||||||||||||||||||||||||||||||||||||
| 1224 | { | - | ||||||||||||||||||||||||||||||||||||
| 1225 | long l; | - | ||||||||||||||||||||||||||||||||||||
| 1226 | - | |||||||||||||||||||||||||||||||||||||
| 1227 | l = (*ap)->id - (*bp)->id; | - | ||||||||||||||||||||||||||||||||||||
| 1228 | if (l == 0L
| 63-39543 | ||||||||||||||||||||||||||||||||||||
| 1229 | return executed 63 times by 2 tests: (0);return (0);Executed by:
executed 63 times by 2 tests: return (0);Executed by:
| 63 | ||||||||||||||||||||||||||||||||||||
| 1230 | else | - | ||||||||||||||||||||||||||||||||||||
| 1231 | return executed 39543 times by 13 tests: ((return ((l > 0) ? 1:-1);Executed by:
executed 39543 times by 13 tests: return ((l > 0) ? 1:-1);Executed by:
| 14071-39543 | ||||||||||||||||||||||||||||||||||||
| 1232 | } | - | ||||||||||||||||||||||||||||||||||||
| 1233 | - | |||||||||||||||||||||||||||||||||||||
| 1234 | - | |||||||||||||||||||||||||||||||||||||
| 1235 | - | |||||||||||||||||||||||||||||||||||||
| 1236 | - | |||||||||||||||||||||||||||||||||||||
| 1237 | - | |||||||||||||||||||||||||||||||||||||
| 1238 | struct stack_st_SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 1239 | SSL_get_ciphers(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1240 | { | - | ||||||||||||||||||||||||||||||||||||
| 1241 | if (s !=
| 0-294 | ||||||||||||||||||||||||||||||||||||
| 1242 | ((void *)0)
| 0-294 | ||||||||||||||||||||||||||||||||||||
| 1243 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1244 | if (s->cipher_list !=
| 9-285 | ||||||||||||||||||||||||||||||||||||
| 1245 | ((void *)0)
| 9-285 | ||||||||||||||||||||||||||||||||||||
| 1246 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1247 | return executed 9 times by 1 test: (s->cipher_list);return (s->cipher_list);Executed by:
executed 9 times by 1 test: return (s->cipher_list);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 1248 | } else if ((
| 0-285 | ||||||||||||||||||||||||||||||||||||
| 1249 | ((void *)0)
| 0-285 | ||||||||||||||||||||||||||||||||||||
| 1250 | )
| 0-285 | ||||||||||||||||||||||||||||||||||||
| 1251 | ((void *)0)
| 0-285 | ||||||||||||||||||||||||||||||||||||
| 1252 | )
| 0-285 | ||||||||||||||||||||||||||||||||||||
| 1253 | return executed 285 times by 7 tests: (s->ctx->cipher_list);return (s->ctx->cipher_list);Executed by:
executed 285 times by 7 tests: return (s->ctx->cipher_list);Executed by:
| 285 | ||||||||||||||||||||||||||||||||||||
| 1254 | } | - | ||||||||||||||||||||||||||||||||||||
| 1255 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 1256 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1257 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1258 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1259 | } | - | ||||||||||||||||||||||||||||||||||||
| 1260 | - | |||||||||||||||||||||||||||||||||||||
| 1261 | - | |||||||||||||||||||||||||||||||||||||
| 1262 | - | |||||||||||||||||||||||||||||||||||||
| 1263 | - | |||||||||||||||||||||||||||||||||||||
| 1264 | - | |||||||||||||||||||||||||||||||||||||
| 1265 | struct stack_st_SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 1266 | ssl_get_ciphers_by_id(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1267 | { | - | ||||||||||||||||||||||||||||||||||||
| 1268 | if (s !=
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1269 | ((void *)0)
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1270 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1271 | if (s->internal->cipher_list_by_id !=
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1272 | ((void *)0)
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1273 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1274 | return never executed: (s->internal->cipher_list_by_id);return (s->internal->cipher_list_by_id);never executed: return (s->internal->cipher_list_by_id); | 0 | ||||||||||||||||||||||||||||||||||||
| 1275 | } else if ((
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1276 | ((void *)0)
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1277 | )
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1278 | (
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1279 | ((void *)0)
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1280 | )
| 0-63 | ||||||||||||||||||||||||||||||||||||
| 1281 | return executed 63 times by 2 tests: (s->ctx->internal->cipher_list_by_id);return (s->ctx->internal->cipher_list_by_id);Executed by:
executed 63 times by 2 tests: return (s->ctx->internal->cipher_list_by_id);Executed by:
| 63 | ||||||||||||||||||||||||||||||||||||
| 1282 | } | - | ||||||||||||||||||||||||||||||||||||
| 1283 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 1284 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1285 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1286 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1287 | } | - | ||||||||||||||||||||||||||||||||||||
| 1288 | - | |||||||||||||||||||||||||||||||||||||
| 1289 | - | |||||||||||||||||||||||||||||||||||||
| 1290 | int | - | ||||||||||||||||||||||||||||||||||||
| 1291 | ssl_has_ecc_ciphers(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1292 | { | - | ||||||||||||||||||||||||||||||||||||
| 1293 | struct stack_st_SSL_CIPHER *ciphers; | - | ||||||||||||||||||||||||||||||||||||
| 1294 | unsigned long alg_k, alg_a; | - | ||||||||||||||||||||||||||||||||||||
| 1295 | SSL_CIPHER *cipher; | - | ||||||||||||||||||||||||||||||||||||
| 1296 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 1297 | - | |||||||||||||||||||||||||||||||||||||
| 1298 | if (s->version == 0xFEFF
| 24-137 | ||||||||||||||||||||||||||||||||||||
| 1299 | return executed 24 times by 2 tests: 0;return 0;Executed by:
executed 24 times by 2 tests: return 0;Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||
| 1300 | if ((
| 0-137 | ||||||||||||||||||||||||||||||||||||
| 1301 | ((void *)0)
| 0-137 | ||||||||||||||||||||||||||||||||||||
| 1302 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1303 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1304 | - | |||||||||||||||||||||||||||||||||||||
| 1305 | for (i = 0; i < sk_num(((_STACK*) (1 ? (ciphers) : (struct stack_st_SSL_CIPHER*)0)))
| 52-452 | ||||||||||||||||||||||||||||||||||||
| 1306 | cipher = ((SSL_CIPHER *)sk_value(((_STACK*) (1 ? (ciphers) : (struct stack_st_SSL_CIPHER*)0)), (i))); | - | ||||||||||||||||||||||||||||||||||||
| 1307 | - | |||||||||||||||||||||||||||||||||||||
| 1308 | alg_k = cipher->algorithm_mkey; | - | ||||||||||||||||||||||||||||||||||||
| 1309 | alg_a = cipher->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||
| 1310 | - | |||||||||||||||||||||||||||||||||||||
| 1311 | if ((
| 0-367 | ||||||||||||||||||||||||||||||||||||
| 1312 | return executed 85 times by 4 tests: 1;return 1;Executed by:
executed 85 times by 4 tests: return 1;Executed by:
| 85 | ||||||||||||||||||||||||||||||||||||
| 1313 | } executed 367 times by 2 tests: end of blockExecuted by:
| 367 | ||||||||||||||||||||||||||||||||||||
| 1314 | - | |||||||||||||||||||||||||||||||||||||
| 1315 | return executed 52 times by 2 tests: 0;return 0;Executed by:
executed 52 times by 2 tests: return 0;Executed by:
| 52 | ||||||||||||||||||||||||||||||||||||
| 1316 | } | - | ||||||||||||||||||||||||||||||||||||
| 1317 | - | |||||||||||||||||||||||||||||||||||||
| 1318 | - | |||||||||||||||||||||||||||||||||||||
| 1319 | const char * | - | ||||||||||||||||||||||||||||||||||||
| 1320 | SSL_get_cipher_list(const SSL *s, int n) | - | ||||||||||||||||||||||||||||||||||||
| 1321 | { | - | ||||||||||||||||||||||||||||||||||||
| 1322 | SSL_CIPHER *c; | - | ||||||||||||||||||||||||||||||||||||
| 1323 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
| 1324 | - | |||||||||||||||||||||||||||||||||||||
| 1325 | if (s ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1326 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1327 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1328 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1329 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1330 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1331 | sk = SSL_get_ciphers(s); | - | ||||||||||||||||||||||||||||||||||||
| 1332 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 1333 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1334 | )
| 0 | ||||||||||||||||||||||||||||||||||||
| 1335 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1336 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1337 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1338 | c = ((SSL_CIPHER *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0)), (n))); | - | ||||||||||||||||||||||||||||||||||||
| 1339 | if (c ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1340 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1341 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1342 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1343 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1344 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1345 | return never executed: (c->name);return (c->name);never executed: return (c->name); | 0 | ||||||||||||||||||||||||||||||||||||
| 1346 | } | - | ||||||||||||||||||||||||||||||||||||
| 1347 | - | |||||||||||||||||||||||||||||||||||||
| 1348 | struct stack_st_SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 1349 | SSL_CTX_get_ciphers(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1350 | { | - | ||||||||||||||||||||||||||||||||||||
| 1351 | return never executed: ctx->cipher_list;return ctx->cipher_list;never executed: return ctx->cipher_list; | 0 | ||||||||||||||||||||||||||||||||||||
| 1352 | } | - | ||||||||||||||||||||||||||||||||||||
| 1353 | - | |||||||||||||||||||||||||||||||||||||
| 1354 | - | |||||||||||||||||||||||||||||||||||||
| 1355 | int | - | ||||||||||||||||||||||||||||||||||||
| 1356 | SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str) | - | ||||||||||||||||||||||||||||||||||||
| 1357 | { | - | ||||||||||||||||||||||||||||||||||||
| 1358 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
| 1359 | - | |||||||||||||||||||||||||||||||||||||
| 1360 | sk = ssl_create_cipher_list(ctx->method, &ctx->cipher_list, | - | ||||||||||||||||||||||||||||||||||||
| 1361 | &ctx->internal->cipher_list_by_id, str); | - | ||||||||||||||||||||||||||||||||||||
| 1362 | if (sk ==
| 0-71 | ||||||||||||||||||||||||||||||||||||
| 1363 | ((void *)0)
| 0-71 | ||||||||||||||||||||||||||||||||||||
| 1364 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1365 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1366 | else if (sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0))) == 0
| 0-71 | ||||||||||||||||||||||||||||||||||||
| 1367 | ERR_put_error(20,(0xfff),(185),__FILE__,1355); | - | ||||||||||||||||||||||||||||||||||||
| 1368 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1369 | } | - | ||||||||||||||||||||||||||||||||||||
| 1370 | return executed 71 times by 5 tests: (1);return (1);Executed by:
executed 71 times by 5 tests: return (1);Executed by:
| 71 | ||||||||||||||||||||||||||||||||||||
| 1371 | } | - | ||||||||||||||||||||||||||||||||||||
| 1372 | - | |||||||||||||||||||||||||||||||||||||
| 1373 | - | |||||||||||||||||||||||||||||||||||||
| 1374 | int | - | ||||||||||||||||||||||||||||||||||||
| 1375 | SSL_set_cipher_list(SSL *s, const char *str) | - | ||||||||||||||||||||||||||||||||||||
| 1376 | { | - | ||||||||||||||||||||||||||||||||||||
| 1377 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
| 1378 | - | |||||||||||||||||||||||||||||||||||||
| 1379 | sk = ssl_create_cipher_list(s->ctx->method, &s->cipher_list, | - | ||||||||||||||||||||||||||||||||||||
| 1380 | &s->internal->cipher_list_by_id, str); | - | ||||||||||||||||||||||||||||||||||||
| 1381 | - | |||||||||||||||||||||||||||||||||||||
| 1382 | if (sk ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1383 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1384 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1385 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1386 | else if (sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0))) == 0
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1387 | SSL_error_internal(s, 185, __FILE__, 1373); | - | ||||||||||||||||||||||||||||||||||||
| 1388 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1389 | } | - | ||||||||||||||||||||||||||||||||||||
| 1390 | return executed 5 times by 1 test: (1);return (1);Executed by:
executed 5 times by 1 test: return (1);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 1391 | } | - | ||||||||||||||||||||||||||||||||||||
| 1392 | - | |||||||||||||||||||||||||||||||||||||
| 1393 | - | |||||||||||||||||||||||||||||||||||||
| 1394 | char * | - | ||||||||||||||||||||||||||||||||||||
| 1395 | SSL_get_shared_ciphers(const SSL *s, char *buf, int len) | - | ||||||||||||||||||||||||||||||||||||
| 1396 | { | - | ||||||||||||||||||||||||||||||||||||
| 1397 | char *end; | - | ||||||||||||||||||||||||||||||||||||
| 1398 | struct stack_st_SSL_CIPHER *sk; | - | ||||||||||||||||||||||||||||||||||||
| 1399 | SSL_CIPHER *c; | - | ||||||||||||||||||||||||||||||||||||
| 1400 | size_t curlen = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1401 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 1402 | - | |||||||||||||||||||||||||||||||||||||
| 1403 | if (s->session ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1404 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1405 | || s->session->ciphers ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1406 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1407 | || len < 2
| 0 | ||||||||||||||||||||||||||||||||||||
| 1408 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1409 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1410 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1411 | - | |||||||||||||||||||||||||||||||||||||
| 1412 | sk = s->session->ciphers; | - | ||||||||||||||||||||||||||||||||||||
| 1413 | if (sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0))) == 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 1414 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1415 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1416 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1417 | - | |||||||||||||||||||||||||||||||||||||
| 1418 | buf[0] = '\0'; | - | ||||||||||||||||||||||||||||||||||||
| 1419 | for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0)))
| 0 | ||||||||||||||||||||||||||||||||||||
| 1420 | c = ((SSL_CIPHER *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_SSL_CIPHER*)0)), (i))); | - | ||||||||||||||||||||||||||||||||||||
| 1421 | end = buf + curlen; | - | ||||||||||||||||||||||||||||||||||||
| 1422 | if (strlcat(buf, c->name, len) >= len
| 0 | ||||||||||||||||||||||||||||||||||||
| 1423 | (
| 0 | ||||||||||||||||||||||||||||||||||||
| 1424 | - | |||||||||||||||||||||||||||||||||||||
| 1425 | *end = '\0'; | - | ||||||||||||||||||||||||||||||||||||
| 1426 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
| 1427 | } | - | ||||||||||||||||||||||||||||||||||||
| 1428 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 1429 | - | |||||||||||||||||||||||||||||||||||||
| 1430 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 1431 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1432 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1433 | * never executed: end = '\0';*end = '\0';never executed: *end = '\0'; | 0 | ||||||||||||||||||||||||||||||||||||
| 1434 | return never executed: (buf);return (buf);never executed: return (buf); | 0 | ||||||||||||||||||||||||||||||||||||
| 1435 | } | - | ||||||||||||||||||||||||||||||||||||
| 1436 | - | |||||||||||||||||||||||||||||||||||||
| 1437 | int | - | ||||||||||||||||||||||||||||||||||||
| 1438 | ssl_cipher_list_to_bytes(SSL *s, struct stack_st_SSL_CIPHER *ciphers, CBB *cbb) | - | ||||||||||||||||||||||||||||||||||||
| 1439 | { | - | ||||||||||||||||||||||||||||||||||||
| 1440 | SSL_CIPHER *cipher; | - | ||||||||||||||||||||||||||||||||||||
| 1441 | int num_ciphers = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1442 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 1443 | - | |||||||||||||||||||||||||||||||||||||
| 1444 | if (ciphers ==
| 0-76 | ||||||||||||||||||||||||||||||||||||
| 1445 | ((void *)0)
| 0-76 | ||||||||||||||||||||||||||||||||||||
| 1446 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1447 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1448 | - | |||||||||||||||||||||||||||||||||||||
| 1449 | for (i = 0; i < sk_num(((_STACK*) (1 ? (ciphers) : (struct stack_st_SSL_CIPHER*)0)))
| 76-1702 | ||||||||||||||||||||||||||||||||||||
| 1450 | if ((
| 0-1702 | ||||||||||||||||||||||||||||||||||||
| 1451 | ((void *)0)
| 0-1702 | ||||||||||||||||||||||||||||||||||||
| 1452 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1453 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1454 | - | |||||||||||||||||||||||||||||||||||||
| 1455 | - | |||||||||||||||||||||||||||||||||||||
| 1456 | if ((
| 795-907 | ||||||||||||||||||||||||||||||||||||
| 1457 | (((
| 115-792 | ||||||||||||||||||||||||||||||||||||
| 1458 | continue; executed 497 times by 2 tests: continue;Executed by:
| 497 | ||||||||||||||||||||||||||||||||||||
| 1459 | - | |||||||||||||||||||||||||||||||||||||
| 1460 | if (!CBB_add_u16(cbb, ssl3_cipher_get_value(cipher))
| 0-1205 | ||||||||||||||||||||||||||||||||||||
| 1461 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1462 | - | |||||||||||||||||||||||||||||||||||||
| 1463 | num_ciphers++; | - | ||||||||||||||||||||||||||||||||||||
| 1464 | } executed 1205 times by 4 tests: end of blockExecuted by:
| 1205 | ||||||||||||||||||||||||||||||||||||
| 1465 | - | |||||||||||||||||||||||||||||||||||||
| 1466 | - | |||||||||||||||||||||||||||||||||||||
| 1467 | if (num_ciphers > 0
| 0-76 | ||||||||||||||||||||||||||||||||||||
| 1468 | if (!CBB_add_u16(cbb, 0x030000FF & 0x0000ffff)
| 0-75 | ||||||||||||||||||||||||||||||||||||
| 1469 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1470 | } executed 75 times by 4 tests: end of blockExecuted by:
| 75 | ||||||||||||||||||||||||||||||||||||
| 1471 | - | |||||||||||||||||||||||||||||||||||||
| 1472 | if (!CBB_flush(cbb)
| 0-76 | ||||||||||||||||||||||||||||||||||||
| 1473 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1474 | - | |||||||||||||||||||||||||||||||||||||
| 1475 | return executed 76 times by 4 tests: 1;return 1;Executed by:
executed 76 times by 4 tests: return 1;Executed by:
| 76 | ||||||||||||||||||||||||||||||||||||
| 1476 | } | - | ||||||||||||||||||||||||||||||||||||
| 1477 | - | |||||||||||||||||||||||||||||||||||||
| 1478 | struct stack_st_SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 1479 | ssl_bytes_to_cipher_list(SSL *s, CBS *cbs) | - | ||||||||||||||||||||||||||||||||||||
| 1480 | { | - | ||||||||||||||||||||||||||||||||||||
| 1481 | struct stack_st_SSL_CIPHER *ciphers = | - | ||||||||||||||||||||||||||||||||||||
| 1482 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1483 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1484 | const SSL_CIPHER *cipher; | - | ||||||||||||||||||||||||||||||||||||
| 1485 | uint16_t cipher_value, max_version; | - | ||||||||||||||||||||||||||||||||||||
| 1486 | unsigned long cipher_id; | - | ||||||||||||||||||||||||||||||||||||
| 1487 | - | |||||||||||||||||||||||||||||||||||||
| 1488 | if (s->s3 !=
| 0-68 | ||||||||||||||||||||||||||||||||||||
| 1489 | ((void *)0)
| 0-68 | ||||||||||||||||||||||||||||||||||||
| 1490 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1491 | ( executed 68 times by 4 tests: s->s3->internal)->send_connection_binding = 0;(s->s3->internal)->send_connection_binding = 0;Executed by:
executed 68 times by 4 tests: (s->s3->internal)->send_connection_binding = 0;Executed by:
| 68 | ||||||||||||||||||||||||||||||||||||
| 1492 | - | |||||||||||||||||||||||||||||||||||||
| 1493 | if ((
| 0-68 | ||||||||||||||||||||||||||||||||||||
| 1494 | ((void *)0)
| 0-68 | ||||||||||||||||||||||||||||||||||||
| 1495 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1496 | SSL_error_internal(s, (1|64), __FILE__, 1462); | - | ||||||||||||||||||||||||||||||||||||
| 1497 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1498 | } | - | ||||||||||||||||||||||||||||||||||||
| 1499 | - | |||||||||||||||||||||||||||||||||||||
| 1500 | while (CBS_len(cbs) > 0
| 66-1020 | ||||||||||||||||||||||||||||||||||||
| 1501 | if (!CBS_get_u16(cbs, &cipher_value)
| 2-1018 | ||||||||||||||||||||||||||||||||||||
| 1502 | SSL_error_internal(s, 151, __FILE__, 1468); | - | ||||||||||||||||||||||||||||||||||||
| 1503 | goto executed 2 times by 1 test: err;goto err;Executed by:
executed 2 times by 1 test: goto err;Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 1504 | } | - | ||||||||||||||||||||||||||||||||||||
| 1505 | - | |||||||||||||||||||||||||||||||||||||
| 1506 | cipher_id = 0x03000000 | cipher_value; | - | ||||||||||||||||||||||||||||||||||||
| 1507 | - | |||||||||||||||||||||||||||||||||||||
| 1508 | if (s->s3 !=
| 0-1018 | ||||||||||||||||||||||||||||||||||||
| 1509 | ((void *)0)
| 0-1018 | ||||||||||||||||||||||||||||||||||||
| 1510 | && cipher_id == 0x030000FF
| 64-954 | ||||||||||||||||||||||||||||||||||||
| 1511 | - | |||||||||||||||||||||||||||||||||||||
| 1512 | - | |||||||||||||||||||||||||||||||||||||
| 1513 | - | |||||||||||||||||||||||||||||||||||||
| 1514 | - | |||||||||||||||||||||||||||||||||||||
| 1515 | if (s->internal->renegotiate
| 0-64 | ||||||||||||||||||||||||||||||||||||
| 1516 | SSL_error_internal(s, 345, __FILE__, 1480); | - | ||||||||||||||||||||||||||||||||||||
| 1517 | ssl3_send_alert(s, 2, | - | ||||||||||||||||||||||||||||||||||||
| 1518 | 40); | - | ||||||||||||||||||||||||||||||||||||
| 1519 | - | |||||||||||||||||||||||||||||||||||||
| 1520 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1521 | } | - | ||||||||||||||||||||||||||||||||||||
| 1522 | (s->s3->internal)->send_connection_binding = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1523 | continue; executed 64 times by 3 tests: continue;Executed by:
| 64 | ||||||||||||||||||||||||||||||||||||
| 1524 | } | - | ||||||||||||||||||||||||||||||||||||
| 1525 | - | |||||||||||||||||||||||||||||||||||||
| 1526 | if (cipher_id == 0x03005600
| 0-954 | ||||||||||||||||||||||||||||||||||||
| 1527 | - | |||||||||||||||||||||||||||||||||||||
| 1528 | - | |||||||||||||||||||||||||||||||||||||
| 1529 | - | |||||||||||||||||||||||||||||||||||||
| 1530 | - | |||||||||||||||||||||||||||||||||||||
| 1531 | - | |||||||||||||||||||||||||||||||||||||
| 1532 | - | |||||||||||||||||||||||||||||||||||||
| 1533 | max_version = ssl_max_server_version(s); | - | ||||||||||||||||||||||||||||||||||||
| 1534 | if (max_version == 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 1535 | SSL_error_internal(s, 373, __FILE__, 1499); | - | ||||||||||||||||||||||||||||||||||||
| 1536 | if (s->s3 !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 1537 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1538 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1539 | ssl3_send_alert(s, 2, never executed: ssl3_send_alert(s, 2, 86); | 0 | ||||||||||||||||||||||||||||||||||||
| 1540 | 86); never executed: ssl3_send_alert(s, 2, 86); | 0 | ||||||||||||||||||||||||||||||||||||
| 1541 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1542 | } | - | ||||||||||||||||||||||||||||||||||||
| 1543 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
| 1544 | } | - | ||||||||||||||||||||||||||||||||||||
| 1545 | - | |||||||||||||||||||||||||||||||||||||
| 1546 | if ((
| 52-902 | ||||||||||||||||||||||||||||||||||||
| 1547 | ((void *)0)
| 52-902 | ||||||||||||||||||||||||||||||||||||
| 1548 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1549 | if (!sk_push(((_STACK*) (1 ? (ciphers) : (struct stack_st_SSL_CIPHER*)0)), ((void*) (1 ? (cipher) : (SSL_CIPHER*)0)))
| 0-902 | ||||||||||||||||||||||||||||||||||||
| 1550 | SSL_error_internal(s, (1|64), __FILE__, 1510); | - | ||||||||||||||||||||||||||||||||||||
| 1551 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1552 | } | - | ||||||||||||||||||||||||||||||||||||
| 1553 | } executed 902 times by 4 tests: end of blockExecuted by:
| 902 | ||||||||||||||||||||||||||||||||||||
| 1554 | } executed 954 times by 4 tests: end of blockExecuted by:
| 954 | ||||||||||||||||||||||||||||||||||||
| 1555 | - | |||||||||||||||||||||||||||||||||||||
| 1556 | return executed 66 times by 4 tests: (ciphers);return (ciphers);Executed by:
executed 66 times by 4 tests: return (ciphers);Executed by:
| 66 | ||||||||||||||||||||||||||||||||||||
| 1557 | - | |||||||||||||||||||||||||||||||||||||
| 1558 | err: | - | ||||||||||||||||||||||||||||||||||||
| 1559 | sk_free(((_STACK*) (1 ? (ciphers) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 1560 | - | |||||||||||||||||||||||||||||||||||||
| 1561 | return executed 2 times by 1 test: (return ( ((void *)0) );Executed by:
executed 2 times by 1 test: return ( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 1562 | ((void *)0) executed 2 times by 1 test: return ( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 1563 | ); executed 2 times by 1 test: return ( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 1564 | } | - | ||||||||||||||||||||||||||||||||||||
| 1565 | - | |||||||||||||||||||||||||||||||||||||
| 1566 | - | |||||||||||||||||||||||||||||||||||||
| 1567 | - | |||||||||||||||||||||||||||||||||||||
| 1568 | - | |||||||||||||||||||||||||||||||||||||
| 1569 | - | |||||||||||||||||||||||||||||||||||||
| 1570 | - | |||||||||||||||||||||||||||||||||||||
| 1571 | const char * | - | ||||||||||||||||||||||||||||||||||||
| 1572 | SSL_get_servername(const SSL *s, const int type) | - | ||||||||||||||||||||||||||||||||||||
| 1573 | { | - | ||||||||||||||||||||||||||||||||||||
| 1574 | if (type != 0
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 1575 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1576 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1577 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1578 | - | |||||||||||||||||||||||||||||||||||||
| 1579 | return executed 4 times by 1 test: (s->sessionreturn (s->session && !s->tlsext_hostname ? s->session->tlsext_hostname : s->tlsext_hostname);Executed by:
executed 4 times by 1 test: return (s->session && !s->tlsext_hostname ? s->session->tlsext_hostname : s->tlsext_hostname);Executed by:
| 0-4 | ||||||||||||||||||||||||||||||||||||
| 1580 | s->session->tlsext_hostname : executed 4 times by 1 test: return (s->session && !s->tlsext_hostname ? s->session->tlsext_hostname : s->tlsext_hostname);Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 1581 | s->tlsext_hostname); executed 4 times by 1 test: return (s->session && !s->tlsext_hostname ? s->session->tlsext_hostname : s->tlsext_hostname);Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 1582 | } | - | ||||||||||||||||||||||||||||||||||||
| 1583 | - | |||||||||||||||||||||||||||||||||||||
| 1584 | int | - | ||||||||||||||||||||||||||||||||||||
| 1585 | SSL_get_servername_type(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 1586 | { | - | ||||||||||||||||||||||||||||||||||||
| 1587 | if (s->session
| 0 | ||||||||||||||||||||||||||||||||||||
| 1588 | (
| 0 | ||||||||||||||||||||||||||||||||||||
| 1589 | s->session->tlsext_hostname : s->tlsext_hostname)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1590 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1591 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1592 | } | - | ||||||||||||||||||||||||||||||||||||
| 1593 | int | - | ||||||||||||||||||||||||||||||||||||
| 1594 | SSL_select_next_proto(unsigned char **out, unsigned char *outlen, | - | ||||||||||||||||||||||||||||||||||||
| 1595 | const unsigned char *server, unsigned int server_len, | - | ||||||||||||||||||||||||||||||||||||
| 1596 | const unsigned char *client, unsigned int client_len) | - | ||||||||||||||||||||||||||||||||||||
| 1597 | { | - | ||||||||||||||||||||||||||||||||||||
| 1598 | unsigned int i, j; | - | ||||||||||||||||||||||||||||||||||||
| 1599 | const unsigned char *result; | - | ||||||||||||||||||||||||||||||||||||
| 1600 | int status = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1601 | - | |||||||||||||||||||||||||||||||||||||
| 1602 | - | |||||||||||||||||||||||||||||||||||||
| 1603 | - | |||||||||||||||||||||||||||||||||||||
| 1604 | - | |||||||||||||||||||||||||||||||||||||
| 1605 | - | |||||||||||||||||||||||||||||||||||||
| 1606 | for (i = 0; i < server_len
| 2-9 | ||||||||||||||||||||||||||||||||||||
| 1607 | for (j = 0; j < client_len
| 3-12 | ||||||||||||||||||||||||||||||||||||
| 1608 | if (server[i] == client[j]
| 0-12 | ||||||||||||||||||||||||||||||||||||
| 1609 | memcmp(&server[i + 1],
| 6 | ||||||||||||||||||||||||||||||||||||
| 1610 | &client[j + 1], server[i]) == 0
| 6 | ||||||||||||||||||||||||||||||||||||
| 1611 | - | |||||||||||||||||||||||||||||||||||||
| 1612 | result = &server[i]; | - | ||||||||||||||||||||||||||||||||||||
| 1613 | status = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1614 | goto executed 6 times by 1 test: found;goto found;Executed by:
executed 6 times by 1 test: goto found;Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
| 1615 | } | - | ||||||||||||||||||||||||||||||||||||
| 1616 | j += client[j]; | - | ||||||||||||||||||||||||||||||||||||
| 1617 | j++; | - | ||||||||||||||||||||||||||||||||||||
| 1618 | } executed 6 times by 1 test: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||||||||||||||
| 1619 | i += server[i]; | - | ||||||||||||||||||||||||||||||||||||
| 1620 | i++; | - | ||||||||||||||||||||||||||||||||||||
| 1621 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||||||||||||||||||||||||||
| 1622 | - | |||||||||||||||||||||||||||||||||||||
| 1623 | - | |||||||||||||||||||||||||||||||||||||
| 1624 | result = client; | - | ||||||||||||||||||||||||||||||||||||
| 1625 | status = 2; | - | ||||||||||||||||||||||||||||||||||||
| 1626 | - | |||||||||||||||||||||||||||||||||||||
| 1627 | found: code before this statement executed 2 times by 1 test: found:Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 1628 | *out = (unsigned char *) result + 1; | - | ||||||||||||||||||||||||||||||||||||
| 1629 | *outlen = result[0]; | - | ||||||||||||||||||||||||||||||||||||
| 1630 | return executed 8 times by 1 test: (status);return (status);Executed by:
executed 8 times by 1 test: return (status);Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 1631 | } | - | ||||||||||||||||||||||||||||||||||||
| 1632 | - | |||||||||||||||||||||||||||||||||||||
| 1633 | - | |||||||||||||||||||||||||||||||||||||
| 1634 | void | - | ||||||||||||||||||||||||||||||||||||
| 1635 | SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, | - | ||||||||||||||||||||||||||||||||||||
| 1636 | unsigned *len) | - | ||||||||||||||||||||||||||||||||||||
| 1637 | { | - | ||||||||||||||||||||||||||||||||||||
| 1638 | *data = | - | ||||||||||||||||||||||||||||||||||||
| 1639 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1640 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1641 | *len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1642 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 1643 | - | |||||||||||||||||||||||||||||||||||||
| 1644 | - | |||||||||||||||||||||||||||||||||||||
| 1645 | void | - | ||||||||||||||||||||||||||||||||||||
| 1646 | SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx, int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
| 1647 | const unsigned char **out, unsigned int *outlen, void *arg), void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 1648 | { | - | ||||||||||||||||||||||||||||||||||||
| 1649 | } | - | ||||||||||||||||||||||||||||||||||||
| 1650 | - | |||||||||||||||||||||||||||||||||||||
| 1651 | - | |||||||||||||||||||||||||||||||||||||
| 1652 | void | - | ||||||||||||||||||||||||||||||||||||
| 1653 | SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, int (*cb) (SSL *s, | - | ||||||||||||||||||||||||||||||||||||
| 1654 | unsigned char **out, unsigned char *outlen, const unsigned char *in, | - | ||||||||||||||||||||||||||||||||||||
| 1655 | unsigned int inlen, void *arg), void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 1656 | { | - | ||||||||||||||||||||||||||||||||||||
| 1657 | } | - | ||||||||||||||||||||||||||||||||||||
| 1658 | - | |||||||||||||||||||||||||||||||||||||
| 1659 | - | |||||||||||||||||||||||||||||||||||||
| 1660 | - | |||||||||||||||||||||||||||||||||||||
| 1661 | - | |||||||||||||||||||||||||||||||||||||
| 1662 | - | |||||||||||||||||||||||||||||||||||||
| 1663 | - | |||||||||||||||||||||||||||||||||||||
| 1664 | int | - | ||||||||||||||||||||||||||||||||||||
| 1665 | SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, | - | ||||||||||||||||||||||||||||||||||||
| 1666 | unsigned int protos_len) | - | ||||||||||||||||||||||||||||||||||||
| 1667 | { | - | ||||||||||||||||||||||||||||||||||||
| 1668 | int failed = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1669 | - | |||||||||||||||||||||||||||||||||||||
| 1670 | if (protos ==
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1671 | ((void *)0)
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1672 | || protos_len == 0
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1673 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1674 | - | |||||||||||||||||||||||||||||||||||||
| 1675 | free(ctx->internal->alpn_client_proto_list); | - | ||||||||||||||||||||||||||||||||||||
| 1676 | ctx->internal->alpn_client_proto_list = | - | ||||||||||||||||||||||||||||||||||||
| 1677 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1678 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1679 | ctx->internal->alpn_client_proto_list_len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1680 | - | |||||||||||||||||||||||||||||||||||||
| 1681 | if ((
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1682 | ==
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1683 | ((void *)0)
| 0-8 | ||||||||||||||||||||||||||||||||||||
| 1684 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1685 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1686 | ctx->internal->alpn_client_proto_list_len = protos_len; | - | ||||||||||||||||||||||||||||||||||||
| 1687 | - | |||||||||||||||||||||||||||||||||||||
| 1688 | memcpy(ctx->internal->alpn_client_proto_list, protos, protos_len); | - | ||||||||||||||||||||||||||||||||||||
| 1689 | - | |||||||||||||||||||||||||||||||||||||
| 1690 | failed = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1691 | - | |||||||||||||||||||||||||||||||||||||
| 1692 | err: code before this statement executed 8 times by 1 test: err:Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 1693 | - | |||||||||||||||||||||||||||||||||||||
| 1694 | return executed 8 times by 1 test: (failed);return (failed);Executed by:
executed 8 times by 1 test: return (failed);Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 1695 | } | - | ||||||||||||||||||||||||||||||||||||
| 1696 | - | |||||||||||||||||||||||||||||||||||||
| 1697 | - | |||||||||||||||||||||||||||||||||||||
| 1698 | - | |||||||||||||||||||||||||||||||||||||
| 1699 | - | |||||||||||||||||||||||||||||||||||||
| 1700 | - | |||||||||||||||||||||||||||||||||||||
| 1701 | - | |||||||||||||||||||||||||||||||||||||
| 1702 | int | - | ||||||||||||||||||||||||||||||||||||
| 1703 | SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, | - | ||||||||||||||||||||||||||||||||||||
| 1704 | unsigned int protos_len) | - | ||||||||||||||||||||||||||||||||||||
| 1705 | { | - | ||||||||||||||||||||||||||||||||||||
| 1706 | int failed = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1707 | - | |||||||||||||||||||||||||||||||||||||
| 1708 | if (protos ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1709 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1710 | || protos_len == 0
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1711 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1712 | - | |||||||||||||||||||||||||||||||||||||
| 1713 | free(ssl->internal->alpn_client_proto_list); | - | ||||||||||||||||||||||||||||||||||||
| 1714 | ssl->internal->alpn_client_proto_list = | - | ||||||||||||||||||||||||||||||||||||
| 1715 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1716 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1717 | ssl->internal->alpn_client_proto_list_len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1718 | - | |||||||||||||||||||||||||||||||||||||
| 1719 | if ((
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1720 | ==
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1721 | ((void *)0)
| 0-5 | ||||||||||||||||||||||||||||||||||||
| 1722 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1723 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1724 | ssl->internal->alpn_client_proto_list_len = protos_len; | - | ||||||||||||||||||||||||||||||||||||
| 1725 | - | |||||||||||||||||||||||||||||||||||||
| 1726 | memcpy(ssl->internal->alpn_client_proto_list, protos, protos_len); | - | ||||||||||||||||||||||||||||||||||||
| 1727 | - | |||||||||||||||||||||||||||||||||||||
| 1728 | failed = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1729 | - | |||||||||||||||||||||||||||||||||||||
| 1730 | err: code before this statement executed 5 times by 2 tests: err:Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 1731 | - | |||||||||||||||||||||||||||||||||||||
| 1732 | return executed 5 times by 2 tests: (failed);return (failed);Executed by:
executed 5 times by 2 tests: return (failed);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 1733 | } | - | ||||||||||||||||||||||||||||||||||||
| 1734 | - | |||||||||||||||||||||||||||||||||||||
| 1735 | - | |||||||||||||||||||||||||||||||||||||
| 1736 | - | |||||||||||||||||||||||||||||||||||||
| 1737 | - | |||||||||||||||||||||||||||||||||||||
| 1738 | - | |||||||||||||||||||||||||||||||||||||
| 1739 | - | |||||||||||||||||||||||||||||||||||||
| 1740 | void | - | ||||||||||||||||||||||||||||||||||||
| 1741 | SSL_CTX_set_alpn_select_cb(SSL_CTX* ctx, | - | ||||||||||||||||||||||||||||||||||||
| 1742 | int (*cb) (SSL *ssl, const unsigned char **out, unsigned char *outlen, | - | ||||||||||||||||||||||||||||||||||||
| 1743 | const unsigned char *in, unsigned int inlen, void *arg), void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 1744 | { | - | ||||||||||||||||||||||||||||||||||||
| 1745 | ctx->internal->alpn_select_cb = cb; | - | ||||||||||||||||||||||||||||||||||||
| 1746 | ctx->internal->alpn_select_cb_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
| 1747 | } executed 10 times by 2 tests: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||||||||
| 1748 | - | |||||||||||||||||||||||||||||||||||||
| 1749 | - | |||||||||||||||||||||||||||||||||||||
| 1750 | - | |||||||||||||||||||||||||||||||||||||
| 1751 | - | |||||||||||||||||||||||||||||||||||||
| 1752 | - | |||||||||||||||||||||||||||||||||||||
| 1753 | - | |||||||||||||||||||||||||||||||||||||
| 1754 | - | |||||||||||||||||||||||||||||||||||||
| 1755 | void | - | ||||||||||||||||||||||||||||||||||||
| 1756 | SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, | - | ||||||||||||||||||||||||||||||||||||
| 1757 | unsigned *len) | - | ||||||||||||||||||||||||||||||||||||
| 1758 | { | - | ||||||||||||||||||||||||||||||||||||
| 1759 | *data = | - | ||||||||||||||||||||||||||||||||||||
| 1760 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1761 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1762 | *len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1763 | - | |||||||||||||||||||||||||||||||||||||
| 1764 | if (ssl->s3 !=
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 1765 | ((void *)0)
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 1766 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1767 | *data = ssl->s3->internal->alpn_selected; | - | ||||||||||||||||||||||||||||||||||||
| 1768 | *len = ssl->s3->internal->alpn_selected_len; | - | ||||||||||||||||||||||||||||||||||||
| 1769 | } executed 126 times by 2 tests: end of blockExecuted by:
| 126 | ||||||||||||||||||||||||||||||||||||
| 1770 | } executed 126 times by 2 tests: end of blockExecuted by:
| 126 | ||||||||||||||||||||||||||||||||||||
| 1771 | - | |||||||||||||||||||||||||||||||||||||
| 1772 | int | - | ||||||||||||||||||||||||||||||||||||
| 1773 | SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, | - | ||||||||||||||||||||||||||||||||||||
| 1774 | const char *label, size_t llen, const unsigned char *p, size_t plen, | - | ||||||||||||||||||||||||||||||||||||
| 1775 | int use_context) | - | ||||||||||||||||||||||||||||||||||||
| 1776 | { | - | ||||||||||||||||||||||||||||||||||||
| 1777 | return never executed: (tls1_export_keying_material(s, out, olen,return (tls1_export_keying_material(s, out, olen, label, llen, p, plen, use_context));never executed: return (tls1_export_keying_material(s, out, olen, label, llen, p, plen, use_context)); | 0 | ||||||||||||||||||||||||||||||||||||
| 1778 | label, llen, p, plen, use_context)); never executed: return (tls1_export_keying_material(s, out, olen, label, llen, p, plen, use_context)); | 0 | ||||||||||||||||||||||||||||||||||||
| 1779 | } | - | ||||||||||||||||||||||||||||||||||||
| 1780 | - | |||||||||||||||||||||||||||||||||||||
| 1781 | static unsigned long | - | ||||||||||||||||||||||||||||||||||||
| 1782 | ssl_session_hash(const SSL_SESSION *a) | - | ||||||||||||||||||||||||||||||||||||
| 1783 | { | - | ||||||||||||||||||||||||||||||||||||
| 1784 | unsigned long l; | - | ||||||||||||||||||||||||||||||||||||
| 1785 | - | |||||||||||||||||||||||||||||||||||||
| 1786 | l = (unsigned long) | - | ||||||||||||||||||||||||||||||||||||
| 1787 | ((unsigned int) a->session_id[0] )| | - | ||||||||||||||||||||||||||||||||||||
| 1788 | ((unsigned int) a->session_id[1]<< 8L)| | - | ||||||||||||||||||||||||||||||||||||
| 1789 | ((unsigned long)a->session_id[2]<<16L)| | - | ||||||||||||||||||||||||||||||||||||
| 1790 | ((unsigned long)a->session_id[3]<<24L); | - | ||||||||||||||||||||||||||||||||||||
| 1791 | return executed 12 times by 2 tests: (l);return (l);Executed by:
executed 12 times by 2 tests: return (l);Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 1792 | } | - | ||||||||||||||||||||||||||||||||||||
| 1793 | static int | - | ||||||||||||||||||||||||||||||||||||
| 1794 | ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b) | - | ||||||||||||||||||||||||||||||||||||
| 1795 | { | - | ||||||||||||||||||||||||||||||||||||
| 1796 | if (a->ssl_version != b->ssl_version
| 0 | ||||||||||||||||||||||||||||||||||||
| 1797 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1798 | if (a->session_id_length != b->session_id_length
| 0 | ||||||||||||||||||||||||||||||||||||
| 1799 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1800 | if (timingsafe_memcmp(a->session_id, b->session_id, a->session_id_length) != 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 1801 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 1802 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 1803 | } | - | ||||||||||||||||||||||||||||||||||||
| 1804 | - | |||||||||||||||||||||||||||||||||||||
| 1805 | - | |||||||||||||||||||||||||||||||||||||
| 1806 | - | |||||||||||||||||||||||||||||||||||||
| 1807 | - | |||||||||||||||||||||||||||||||||||||
| 1808 | - | |||||||||||||||||||||||||||||||||||||
| 1809 | - | |||||||||||||||||||||||||||||||||||||
| 1810 | - | |||||||||||||||||||||||||||||||||||||
| 1811 | static unsigned long | - | ||||||||||||||||||||||||||||||||||||
| 1812 | ssl_session_LHASH_HASH(const void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 1813 | { | - | ||||||||||||||||||||||||||||||||||||
| 1814 | const SSL_SESSION *a = arg; | - | ||||||||||||||||||||||||||||||||||||
| 1815 | - | |||||||||||||||||||||||||||||||||||||
| 1816 | return executed 12 times by 2 tests: ssl_session_hash(a);return ssl_session_hash(a);Executed by:
executed 12 times by 2 tests: return ssl_session_hash(a);Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 1817 | } | - | ||||||||||||||||||||||||||||||||||||
| 1818 | - | |||||||||||||||||||||||||||||||||||||
| 1819 | static int | - | ||||||||||||||||||||||||||||||||||||
| 1820 | ssl_session_LHASH_COMP(const void *arg1, const void *arg2) | - | ||||||||||||||||||||||||||||||||||||
| 1821 | { | - | ||||||||||||||||||||||||||||||||||||
| 1822 | const SSL_SESSION *a = arg1; | - | ||||||||||||||||||||||||||||||||||||
| 1823 | const SSL_SESSION *b = arg2; | - | ||||||||||||||||||||||||||||||||||||
| 1824 | - | |||||||||||||||||||||||||||||||||||||
| 1825 | return never executed: ssl_session_cmp(a, b);return ssl_session_cmp(a, b);never executed: return ssl_session_cmp(a, b); | 0 | ||||||||||||||||||||||||||||||||||||
| 1826 | } | - | ||||||||||||||||||||||||||||||||||||
| 1827 | - | |||||||||||||||||||||||||||||||||||||
| 1828 | SSL_CTX * | - | ||||||||||||||||||||||||||||||||||||
| 1829 | SSL_CTX_new(const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
| 1830 | { | - | ||||||||||||||||||||||||||||||||||||
| 1831 | SSL_CTX *ret; | - | ||||||||||||||||||||||||||||||||||||
| 1832 | - | |||||||||||||||||||||||||||||||||||||
| 1833 | if (!OPENSSL_init_ssl(0,
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1834 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1835 | )
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1836 | ERR_put_error(20,(0xfff),(274),__FILE__,1794); | - | ||||||||||||||||||||||||||||||||||||
| 1837 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1838 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1839 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1840 | } | - | ||||||||||||||||||||||||||||||||||||
| 1841 | - | |||||||||||||||||||||||||||||||||||||
| 1842 | if (meth ==
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1843 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1844 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1845 | ERR_put_error(20,(0xfff),(196),__FILE__,1799); | - | ||||||||||||||||||||||||||||||||||||
| 1846 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1847 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1848 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1849 | } | - | ||||||||||||||||||||||||||||||||||||
| 1850 | - | |||||||||||||||||||||||||||||||||||||
| 1851 | if ((
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1852 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1853 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1854 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,1804); | - | ||||||||||||||||||||||||||||||||||||
| 1855 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1856 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1857 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1858 | } | - | ||||||||||||||||||||||||||||||||||||
| 1859 | if ((
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1860 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1861 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1862 | free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 1863 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,1809); | - | ||||||||||||||||||||||||||||||||||||
| 1864 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1865 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1866 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1867 | } | - | ||||||||||||||||||||||||||||||||||||
| 1868 | - | |||||||||||||||||||||||||||||||||||||
| 1869 | if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1870 | ERR_put_error(20,(0xfff),(269),__FILE__,1814); | - | ||||||||||||||||||||||||||||||||||||
| 1871 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1872 | } | - | ||||||||||||||||||||||||||||||||||||
| 1873 | - | |||||||||||||||||||||||||||||||||||||
| 1874 | ret->method = meth; | - | ||||||||||||||||||||||||||||||||||||
| 1875 | ret->internal->min_version = meth->internal->min_version; | - | ||||||||||||||||||||||||||||||||||||
| 1876 | ret->internal->max_version = meth->internal->max_version; | - | ||||||||||||||||||||||||||||||||||||
| 1877 | - | |||||||||||||||||||||||||||||||||||||
| 1878 | ret->cert_store = | - | ||||||||||||||||||||||||||||||||||||
| 1879 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1880 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1881 | ret->internal->session_cache_mode = 0x0002; | - | ||||||||||||||||||||||||||||||||||||
| 1882 | ret->internal->session_cache_size = (1024*20); | - | ||||||||||||||||||||||||||||||||||||
| 1883 | ret->internal->session_cache_head = | - | ||||||||||||||||||||||||||||||||||||
| 1884 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1885 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1886 | ret->internal->session_cache_tail = | - | ||||||||||||||||||||||||||||||||||||
| 1887 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1888 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1889 | - | |||||||||||||||||||||||||||||||||||||
| 1890 | - | |||||||||||||||||||||||||||||||||||||
| 1891 | ret->session_timeout = meth->internal->get_timeout(); | - | ||||||||||||||||||||||||||||||||||||
| 1892 | - | |||||||||||||||||||||||||||||||||||||
| 1893 | ret->internal->new_session_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1894 | ret->internal->remove_session_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1895 | ret->internal->get_session_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1896 | ret->internal->generate_session_id = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1897 | - | |||||||||||||||||||||||||||||||||||||
| 1898 | memset((char *)&ret->internal->stats, 0, sizeof(ret->internal->stats)); | - | ||||||||||||||||||||||||||||||||||||
| 1899 | - | |||||||||||||||||||||||||||||||||||||
| 1900 | ret->references = 1; | - | ||||||||||||||||||||||||||||||||||||
| 1901 | ret->internal->quiet_shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1902 | - | |||||||||||||||||||||||||||||||||||||
| 1903 | ret->internal->info_callback = | - | ||||||||||||||||||||||||||||||||||||
| 1904 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1905 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1906 | - | |||||||||||||||||||||||||||||||||||||
| 1907 | ret->internal->app_verify_callback = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1908 | ret->internal->app_verify_arg = | - | ||||||||||||||||||||||||||||||||||||
| 1909 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1910 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1911 | - | |||||||||||||||||||||||||||||||||||||
| 1912 | ret->internal->max_cert_list = 1024*100; | - | ||||||||||||||||||||||||||||||||||||
| 1913 | ret->internal->read_ahead = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1914 | ret->internal->msg_callback = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1915 | ret->internal->msg_callback_arg = | - | ||||||||||||||||||||||||||||||||||||
| 1916 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1917 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1918 | ret->verify_mode = 0x00; | - | ||||||||||||||||||||||||||||||||||||
| 1919 | ret->sid_ctx_length = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1920 | ret->internal->default_verify_callback = | - | ||||||||||||||||||||||||||||||||||||
| 1921 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1922 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1923 | if ((
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1924 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1925 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1926 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1927 | - | |||||||||||||||||||||||||||||||||||||
| 1928 | ret->default_passwd_callback = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1929 | ret->default_passwd_callback_userdata = | - | ||||||||||||||||||||||||||||||||||||
| 1930 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1931 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1932 | ret->internal->client_cert_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1933 | ret->internal->app_gen_cookie_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1934 | ret->internal->app_verify_cookie_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1935 | - | |||||||||||||||||||||||||||||||||||||
| 1936 | ret->internal->sessions = ((struct lhash_st_SSL_SESSION *)lh_new(ssl_session_LHASH_HASH, ssl_session_LHASH_COMP)); | - | ||||||||||||||||||||||||||||||||||||
| 1937 | if (ret->internal->sessions ==
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1938 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1939 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1940 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1941 | ret->cert_store = X509_STORE_new(); | - | ||||||||||||||||||||||||||||||||||||
| 1942 | if (ret->cert_store ==
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1943 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1944 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1945 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1946 | - | |||||||||||||||||||||||||||||||||||||
| 1947 | ssl_create_cipher_list(ret->method, &ret->cipher_list, | - | ||||||||||||||||||||||||||||||||||||
| 1948 | &ret->internal->cipher_list_by_id, "ALL:!aNULL:!eNULL:!SSLv2"); | - | ||||||||||||||||||||||||||||||||||||
| 1949 | if (ret->cipher_list ==
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1950 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1951 | || | - | ||||||||||||||||||||||||||||||||||||
| 1952 | sk_num(((_STACK*) (1 ? (ret->cipher_list) : (struct stack_st_SSL_CIPHER*)0))) <= 0
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1953 | ERR_put_error(20,(0xfff),(161),__FILE__,1873); | - | ||||||||||||||||||||||||||||||||||||
| 1954 | goto never executed: err2;goto err2;never executed: goto err2; | 0 | ||||||||||||||||||||||||||||||||||||
| 1955 | } | - | ||||||||||||||||||||||||||||||||||||
| 1956 | - | |||||||||||||||||||||||||||||||||||||
| 1957 | ret->param = X509_VERIFY_PARAM_new(); | - | ||||||||||||||||||||||||||||||||||||
| 1958 | if (!ret->param
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1959 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1960 | - | |||||||||||||||||||||||||||||||||||||
| 1961 | if ((
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1962 | ((void *)0)
| 0-214 | ||||||||||||||||||||||||||||||||||||
| 1963 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1964 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 1965 | - | |||||||||||||||||||||||||||||||||||||
| 1966 | CRYPTO_new_ex_data(2, ret, &ret->internal->ex_data); | - | ||||||||||||||||||||||||||||||||||||
| 1967 | - | |||||||||||||||||||||||||||||||||||||
| 1968 | ret->extra_certs = | - | ||||||||||||||||||||||||||||||||||||
| 1969 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1970 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1971 | - | |||||||||||||||||||||||||||||||||||||
| 1972 | ret->internal->max_send_fragment = 16384; | - | ||||||||||||||||||||||||||||||||||||
| 1973 | - | |||||||||||||||||||||||||||||||||||||
| 1974 | ret->internal->tlsext_servername_callback = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1975 | ret->internal->tlsext_servername_arg = | - | ||||||||||||||||||||||||||||||||||||
| 1976 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1977 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1978 | - | |||||||||||||||||||||||||||||||||||||
| 1979 | - | |||||||||||||||||||||||||||||||||||||
| 1980 | arc4random_buf(ret->internal->tlsext_tick_key_name, 16); | - | ||||||||||||||||||||||||||||||||||||
| 1981 | arc4random_buf(ret->internal->tlsext_tick_hmac_key, 16); | - | ||||||||||||||||||||||||||||||||||||
| 1982 | arc4random_buf(ret->internal->tlsext_tick_aes_key, 16); | - | ||||||||||||||||||||||||||||||||||||
| 1983 | - | |||||||||||||||||||||||||||||||||||||
| 1984 | ret->internal->tlsext_status_cb = 0; | - | ||||||||||||||||||||||||||||||||||||
| 1985 | ret->internal->tlsext_status_arg = | - | ||||||||||||||||||||||||||||||||||||
| 1986 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1987 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1988 | - | |||||||||||||||||||||||||||||||||||||
| 1989 | - | |||||||||||||||||||||||||||||||||||||
| 1990 | ret->internal->client_cert_engine = | - | ||||||||||||||||||||||||||||||||||||
| 1991 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1992 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1993 | ret->internal->options |= 0x00000004L; | - | ||||||||||||||||||||||||||||||||||||
| 1994 | - | |||||||||||||||||||||||||||||||||||||
| 1995 | return executed 214 times by 13 tests: (ret);return (ret);Executed by:
executed 214 times by 13 tests: return (ret);Executed by:
| 214 | ||||||||||||||||||||||||||||||||||||
| 1996 | err: | - | ||||||||||||||||||||||||||||||||||||
| 1997 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,1929); | - | ||||||||||||||||||||||||||||||||||||
| 1998 | err2: code before this statement never executed: err2: | 0 | ||||||||||||||||||||||||||||||||||||
| 1999 | SSL_CTX_free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 2000 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2001 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2002 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2003 | } | - | ||||||||||||||||||||||||||||||||||||
| 2004 | - | |||||||||||||||||||||||||||||||||||||
| 2005 | void | - | ||||||||||||||||||||||||||||||||||||
| 2006 | SSL_CTX_free(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 2007 | { | - | ||||||||||||||||||||||||||||||||||||
| 2008 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 2009 | - | |||||||||||||||||||||||||||||||||||||
| 2010 | if (ctx ==
| 74-597 | ||||||||||||||||||||||||||||||||||||
| 2011 | ((void *)0)
| 74-597 | ||||||||||||||||||||||||||||||||||||
| 2012 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2013 | return; executed 74 times by 2 tests: return;Executed by:
| 74 | ||||||||||||||||||||||||||||||||||||
| 2014 | - | |||||||||||||||||||||||||||||||||||||
| 2015 | i = CRYPTO_add_lock(&ctx->references,-1,12,__FILE__,1943); | - | ||||||||||||||||||||||||||||||||||||
| 2016 | if (i > 0
| 207-390 | ||||||||||||||||||||||||||||||||||||
| 2017 | return; executed 390 times by 11 tests: return;Executed by:
| 390 | ||||||||||||||||||||||||||||||||||||
| 2018 | - | |||||||||||||||||||||||||||||||||||||
| 2019 | X509_VERIFY_PARAM_free(ctx->param); | - | ||||||||||||||||||||||||||||||||||||
| 2020 | if (ctx->internal->sessions !=
| 0-207 | ||||||||||||||||||||||||||||||||||||
| 2021 | ((void *)0)
| 0-207 | ||||||||||||||||||||||||||||||||||||
| 2022 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2023 | SSL_CTX_flush_sessions(ctx, 0); executed 207 times by 13 tests: SSL_CTX_flush_sessions(ctx, 0);Executed by:
| 207 | ||||||||||||||||||||||||||||||||||||
| 2024 | - | |||||||||||||||||||||||||||||||||||||
| 2025 | CRYPTO_free_ex_data(2, ctx, &ctx->internal->ex_data); | - | ||||||||||||||||||||||||||||||||||||
| 2026 | - | |||||||||||||||||||||||||||||||||||||
| 2027 | lh_free(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||||||||||||||
| 2028 | - | |||||||||||||||||||||||||||||||||||||
| 2029 | X509_STORE_free(ctx->cert_store); | - | ||||||||||||||||||||||||||||||||||||
| 2030 | sk_free(((_STACK*) (1 ? (ctx->cipher_list) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 2031 | sk_free(((_STACK*) (1 ? (ctx->internal->cipher_list_by_id) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||||||||||||||
| 2032 | ssl_cert_free(ctx->internal->cert); | - | ||||||||||||||||||||||||||||||||||||
| 2033 | sk_pop_free(((_STACK*) (1 ? (ctx->internal->client_CA) : (struct stack_st_X509_NAME*)0)), ((void (*)(void *)) ((1 ? (X509_NAME_free) : (void (*)(X509_NAME *))0)))); | - | ||||||||||||||||||||||||||||||||||||
| 2034 | sk_pop_free(((_STACK*) (1 ? (ctx->extra_certs) : (struct stack_st_X509*)0)), ((void (*)(void *)) ((1 ? (X509_free) : (void (*)(X509 *))0)))); | - | ||||||||||||||||||||||||||||||||||||
| 2035 | - | |||||||||||||||||||||||||||||||||||||
| 2036 | - | |||||||||||||||||||||||||||||||||||||
| 2037 | if (ctx->internal->srtp_profiles
| 0-207 | ||||||||||||||||||||||||||||||||||||
| 2038 | sk_free(((_STACK*) (1 ? (ctx->internal->srtp_profiles) : (struct stack_st_SRTP_PROTECTION_PROFILE*)0))); never executed: sk_free(((_STACK*) (1 ? (ctx->internal->srtp_profiles) : (struct stack_st_SRTP_PROTECTION_PROFILE*)0))); | 0 | ||||||||||||||||||||||||||||||||||||
| 2039 | - | |||||||||||||||||||||||||||||||||||||
| 2040 | - | |||||||||||||||||||||||||||||||||||||
| 2041 | - | |||||||||||||||||||||||||||||||||||||
| 2042 | ENGINE_finish(ctx->internal->client_cert_engine); | - | ||||||||||||||||||||||||||||||||||||
| 2043 | - | |||||||||||||||||||||||||||||||||||||
| 2044 | - | |||||||||||||||||||||||||||||||||||||
| 2045 | free(ctx->internal->tlsext_ecpointformatlist); | - | ||||||||||||||||||||||||||||||||||||
| 2046 | free(ctx->internal->tlsext_supportedgroups); | - | ||||||||||||||||||||||||||||||||||||
| 2047 | - | |||||||||||||||||||||||||||||||||||||
| 2048 | free(ctx->internal->alpn_client_proto_list); | - | ||||||||||||||||||||||||||||||||||||
| 2049 | - | |||||||||||||||||||||||||||||||||||||
| 2050 | free(ctx->internal); | - | ||||||||||||||||||||||||||||||||||||
| 2051 | free(ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2052 | } executed 207 times by 13 tests: end of blockExecuted by:
| 207 | ||||||||||||||||||||||||||||||||||||
| 2053 | - | |||||||||||||||||||||||||||||||||||||
| 2054 | int | - | ||||||||||||||||||||||||||||||||||||
| 2055 | SSL_CTX_up_ref(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 2056 | { | - | ||||||||||||||||||||||||||||||||||||
| 2057 | int refs = CRYPTO_add_lock(&ctx->references,1,12,__FILE__,1993); | - | ||||||||||||||||||||||||||||||||||||
| 2058 | return never executed: ((return ((refs > 1) ? 1 : 0);
never executed: return ((refs > 1) ? 1 : 0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2059 | } | - | ||||||||||||||||||||||||||||||||||||
| 2060 | - | |||||||||||||||||||||||||||||||||||||
| 2061 | pem_password_cb * | - | ||||||||||||||||||||||||||||||||||||
| 2062 | SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 2063 | { | - | ||||||||||||||||||||||||||||||||||||
| 2064 | return never executed: (ctx->default_passwd_callback);return (ctx->default_passwd_callback);never executed: return (ctx->default_passwd_callback); | 0 | ||||||||||||||||||||||||||||||||||||
| 2065 | } | - | ||||||||||||||||||||||||||||||||||||
| 2066 | - | |||||||||||||||||||||||||||||||||||||
| 2067 | void | - | ||||||||||||||||||||||||||||||||||||
| 2068 | SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) | - | ||||||||||||||||||||||||||||||||||||
| 2069 | { | - | ||||||||||||||||||||||||||||||||||||
| 2070 | ctx->default_passwd_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
| 2071 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2072 | - | |||||||||||||||||||||||||||||||||||||
| 2073 | void * | - | ||||||||||||||||||||||||||||||||||||
| 2074 | SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 2075 | { | - | ||||||||||||||||||||||||||||||||||||
| 2076 | return never executed: ctx->default_passwd_callback_userdata;return ctx->default_passwd_callback_userdata;never executed: return ctx->default_passwd_callback_userdata; | 0 | ||||||||||||||||||||||||||||||||||||
| 2077 | } | - | ||||||||||||||||||||||||||||||||||||
| 2078 | - | |||||||||||||||||||||||||||||||||||||
| 2079 | void | - | ||||||||||||||||||||||||||||||||||||
| 2080 | SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u) | - | ||||||||||||||||||||||||||||||||||||
| 2081 | { | - | ||||||||||||||||||||||||||||||||||||
| 2082 | ctx->default_passwd_callback_userdata = u; | - | ||||||||||||||||||||||||||||||||||||
| 2083 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2084 | - | |||||||||||||||||||||||||||||||||||||
| 2085 | void | - | ||||||||||||||||||||||||||||||||||||
| 2086 | SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *, | - | ||||||||||||||||||||||||||||||||||||
| 2087 | void *), void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 2088 | { | - | ||||||||||||||||||||||||||||||||||||
| 2089 | ctx->internal->app_verify_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
| 2090 | ctx->internal->app_verify_arg = arg; | - | ||||||||||||||||||||||||||||||||||||
| 2091 | } executed 18 times by 2 tests: end of blockExecuted by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 2092 | - | |||||||||||||||||||||||||||||||||||||
| 2093 | void | - | ||||||||||||||||||||||||||||||||||||
| 2094 | SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb)(int, X509_STORE_CTX *)) | - | ||||||||||||||||||||||||||||||||||||
| 2095 | { | - | ||||||||||||||||||||||||||||||||||||
| 2096 | ctx->verify_mode = mode; | - | ||||||||||||||||||||||||||||||||||||
| 2097 | ctx->internal->default_verify_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
| 2098 | } executed 18 times by 2 tests: end of blockExecuted by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 2099 | - | |||||||||||||||||||||||||||||||||||||
| 2100 | void | - | ||||||||||||||||||||||||||||||||||||
| 2101 | SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth) | - | ||||||||||||||||||||||||||||||||||||
| 2102 | { | - | ||||||||||||||||||||||||||||||||||||
| 2103 | X509_VERIFY_PARAM_set_depth(ctx->param, depth); | - | ||||||||||||||||||||||||||||||||||||
| 2104 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 2105 | - | |||||||||||||||||||||||||||||||||||||
| 2106 | void | - | ||||||||||||||||||||||||||||||||||||
| 2107 | ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | - | ||||||||||||||||||||||||||||||||||||
| 2108 | { | - | ||||||||||||||||||||||||||||||||||||
| 2109 | int rsa_enc, rsa_sign, dh_tmp; | - | ||||||||||||||||||||||||||||||||||||
| 2110 | int have_ecc_cert; | - | ||||||||||||||||||||||||||||||||||||
| 2111 | unsigned long mask_k, mask_a; | - | ||||||||||||||||||||||||||||||||||||
| 2112 | X509 *x = | - | ||||||||||||||||||||||||||||||||||||
| 2113 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2114 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2115 | CERT_PKEY *cpk; | - | ||||||||||||||||||||||||||||||||||||
| 2116 | - | |||||||||||||||||||||||||||||||||||||
| 2117 | if (c ==
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2118 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2119 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2120 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 2121 | - | |||||||||||||||||||||||||||||||||||||
| 2122 | dh_tmp = (c->dh_tmp !=
| 25-124 | ||||||||||||||||||||||||||||||||||||
| 2123 | ((void *)0)
| 25-124 | ||||||||||||||||||||||||||||||||||||
| 2124 | || c->dh_tmp_cb !=
| 0-25 | ||||||||||||||||||||||||||||||||||||
| 2125 | ((void *)0)
| 0-25 | ||||||||||||||||||||||||||||||||||||
| 2126 | || | - | ||||||||||||||||||||||||||||||||||||
| 2127 | c->dh_tmp_auto != 0
| 6-19 | ||||||||||||||||||||||||||||||||||||
| 2128 | - | |||||||||||||||||||||||||||||||||||||
| 2129 | cpk = &(c->pkeys[0]); | - | ||||||||||||||||||||||||||||||||||||
| 2130 | rsa_enc = (cpk->x509 !=
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2131 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2132 | && cpk->privatekey !=
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2133 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2134 | ); | - | ||||||||||||||||||||||||||||||||||||
| 2135 | cpk = &(c->pkeys[1]); | - | ||||||||||||||||||||||||||||||||||||
| 2136 | rsa_sign = (cpk->x509 !=
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2137 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2138 | && cpk->privatekey !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2139 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2140 | ); | - | ||||||||||||||||||||||||||||||||||||
| 2141 | cpk = &(c->pkeys[3]); | - | ||||||||||||||||||||||||||||||||||||
| 2142 | have_ecc_cert = (cpk->x509 !=
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2143 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2144 | && cpk->privatekey !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2145 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2146 | ); | - | ||||||||||||||||||||||||||||||||||||
| 2147 | - | |||||||||||||||||||||||||||||||||||||
| 2148 | mask_k = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2149 | mask_a = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2150 | - | |||||||||||||||||||||||||||||||||||||
| 2151 | cpk = &(c->pkeys[4]); | - | ||||||||||||||||||||||||||||||||||||
| 2152 | if (cpk->x509 !=
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2153 | ((void *)0)
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2154 | && cpk->privatekey !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2155 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2156 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2157 | mask_k |= 0x00000200L; | - | ||||||||||||||||||||||||||||||||||||
| 2158 | mask_a |= 0x00000200L; | - | ||||||||||||||||||||||||||||||||||||
| 2159 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2160 | - | |||||||||||||||||||||||||||||||||||||
| 2161 | if (rsa_enc
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2162 | mask_k |= 0x00000001L; executed 149 times by 3 tests: mask_k |= 0x00000001L;Executed by:
| 149 | ||||||||||||||||||||||||||||||||||||
| 2163 | - | |||||||||||||||||||||||||||||||||||||
| 2164 | if (dh_tmp
| 19-130 | ||||||||||||||||||||||||||||||||||||
| 2165 | mask_k |= 0x00000008L; executed 130 times by 2 tests: mask_k |= 0x00000008L;Executed by:
| 130 | ||||||||||||||||||||||||||||||||||||
| 2166 | - | |||||||||||||||||||||||||||||||||||||
| 2167 | if (rsa_enc
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2168 | mask_a |= 0x00000001L; executed 149 times by 3 tests: mask_a |= 0x00000001L;Executed by:
| 149 | ||||||||||||||||||||||||||||||||||||
| 2169 | - | |||||||||||||||||||||||||||||||||||||
| 2170 | mask_a |= 0x00000004L; | - | ||||||||||||||||||||||||||||||||||||
| 2171 | - | |||||||||||||||||||||||||||||||||||||
| 2172 | - | |||||||||||||||||||||||||||||||||||||
| 2173 | - | |||||||||||||||||||||||||||||||||||||
| 2174 | - | |||||||||||||||||||||||||||||||||||||
| 2175 | - | |||||||||||||||||||||||||||||||||||||
| 2176 | if (have_ecc_cert
| 0-149 | ||||||||||||||||||||||||||||||||||||
| 2177 | x = (c->pkeys[3]).x509; | - | ||||||||||||||||||||||||||||||||||||
| 2178 | - | |||||||||||||||||||||||||||||||||||||
| 2179 | - | |||||||||||||||||||||||||||||||||||||
| 2180 | X509_check_purpose(x, -1, 0); | - | ||||||||||||||||||||||||||||||||||||
| 2181 | - | |||||||||||||||||||||||||||||||||||||
| 2182 | - | |||||||||||||||||||||||||||||||||||||
| 2183 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2184 | (
| 0 | ||||||||||||||||||||||||||||||||||||
| 2185 | mask_a |= 0x00000040L; never executed: mask_a |= 0x00000040L; | 0 | ||||||||||||||||||||||||||||||||||||
| 2186 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2187 | - | |||||||||||||||||||||||||||||||||||||
| 2188 | mask_k |= 0x00000080L; | - | ||||||||||||||||||||||||||||||||||||
| 2189 | - | |||||||||||||||||||||||||||||||||||||
| 2190 | c->mask_k = mask_k; | - | ||||||||||||||||||||||||||||||||||||
| 2191 | c->mask_a = mask_a; | - | ||||||||||||||||||||||||||||||||||||
| 2192 | c->valid = 1; | - | ||||||||||||||||||||||||||||||||||||
| 2193 | } executed 149 times by 3 tests: end of blockExecuted by:
| 149 | ||||||||||||||||||||||||||||||||||||
| 2194 | - | |||||||||||||||||||||||||||||||||||||
| 2195 | - | |||||||||||||||||||||||||||||||||||||
| 2196 | int | - | ||||||||||||||||||||||||||||||||||||
| 2197 | ssl_using_ecc_cipher(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2198 | { | - | ||||||||||||||||||||||||||||||||||||
| 2199 | unsigned long alg_a, alg_k; | - | ||||||||||||||||||||||||||||||||||||
| 2200 | - | |||||||||||||||||||||||||||||||||||||
| 2201 | alg_a = (s->s3->internal)->hs.new_cipher->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||
| 2202 | alg_k = (s->s3->internal)->hs.new_cipher->algorithm_mkey; | - | ||||||||||||||||||||||||||||||||||||
| 2203 | - | |||||||||||||||||||||||||||||||||||||
| 2204 | return executed 58 times by 4 tests: (return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
executed 58 times by 4 tests: return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
| 27-58 | ||||||||||||||||||||||||||||||||||||
| 2205 | ((void *)0)
executed 58 times by 4 tests: return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
| 27-58 | ||||||||||||||||||||||||||||||||||||
| 2206 | && executed 58 times by 4 tests: return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
| 58 | ||||||||||||||||||||||||||||||||||||
| 2207 | (
executed 58 times by 4 tests: return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
| 0-58 | ||||||||||||||||||||||||||||||||||||
| 2208 | ((
executed 58 times by 4 tests: return (s->session->internal)->tlsext_ecpointformatlist != ((void *)0) && (s->session->internal)->tlsext_ecpointformatlist_length > 0 && ((alg_k & 0x00000080L) || (alg_a & 0x00000040L));Executed by:
| 0-58 | ||||||||||||||||||||||||||||||||||||
| 2209 | } | - | ||||||||||||||||||||||||||||||||||||
| 2210 | - | |||||||||||||||||||||||||||||||||||||
| 2211 | int | - | ||||||||||||||||||||||||||||||||||||
| 2212 | ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2213 | { | - | ||||||||||||||||||||||||||||||||||||
| 2214 | const SSL_CIPHER *cs = (s->s3->internal)->hs.new_cipher; | - | ||||||||||||||||||||||||||||||||||||
| 2215 | unsigned long alg_a; | - | ||||||||||||||||||||||||||||||||||||
| 2216 | - | |||||||||||||||||||||||||||||||||||||
| 2217 | alg_a = cs->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||
| 2218 | - | |||||||||||||||||||||||||||||||||||||
| 2219 | if (alg_a & 0x00000040L
| 0 | ||||||||||||||||||||||||||||||||||||
| 2220 | - | |||||||||||||||||||||||||||||||||||||
| 2221 | X509_check_purpose(x, -1, 0); | - | ||||||||||||||||||||||||||||||||||||
| 2222 | - | |||||||||||||||||||||||||||||||||||||
| 2223 | - | |||||||||||||||||||||||||||||||||||||
| 2224 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2225 | ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2226 | SSL_error_internal(s, 318, __FILE__, 2136); | - | ||||||||||||||||||||||||||||||||||||
| 2227 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2228 | } | - | ||||||||||||||||||||||||||||||||||||
| 2229 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2230 | - | |||||||||||||||||||||||||||||||||||||
| 2231 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 2232 | } | - | ||||||||||||||||||||||||||||||||||||
| 2233 | - | |||||||||||||||||||||||||||||||||||||
| 2234 | CERT_PKEY * | - | ||||||||||||||||||||||||||||||||||||
| 2235 | ssl_get_server_send_pkey(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2236 | { | - | ||||||||||||||||||||||||||||||||||||
| 2237 | unsigned long alg_a; | - | ||||||||||||||||||||||||||||||||||||
| 2238 | CERT *c; | - | ||||||||||||||||||||||||||||||||||||
| 2239 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 2240 | - | |||||||||||||||||||||||||||||||||||||
| 2241 | c = s->cert; | - | ||||||||||||||||||||||||||||||||||||
| 2242 | ssl_set_cert_masks(c, (s->s3->internal)->hs.new_cipher); | - | ||||||||||||||||||||||||||||||||||||
| 2243 | - | |||||||||||||||||||||||||||||||||||||
| 2244 | alg_a = (s->s3->internal)->hs.new_cipher->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||
| 2245 | - | |||||||||||||||||||||||||||||||||||||
| 2246 | if (alg_a & 0x00000040L
| 0-61 | ||||||||||||||||||||||||||||||||||||
| 2247 | i = 3; | - | ||||||||||||||||||||||||||||||||||||
| 2248 | } never executed: else if (alg_a & 0x00000001Lend of block
| 0-61 | ||||||||||||||||||||||||||||||||||||
| 2249 | if (c->pkeys[0].x509 ==
| 0-61 | ||||||||||||||||||||||||||||||||||||
| 2250 | ((void *)0)
| 0-61 | ||||||||||||||||||||||||||||||||||||
| 2251 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2252 | i = 1; never executed: i = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 2253 | else | - | ||||||||||||||||||||||||||||||||||||
| 2254 | i = 0; executed 61 times by 3 tests: i = 0;Executed by:
| 61 | ||||||||||||||||||||||||||||||||||||
| 2255 | } else if (alg_a & 0x00000200L
| 0 | ||||||||||||||||||||||||||||||||||||
| 2256 | i = 4; | - | ||||||||||||||||||||||||||||||||||||
| 2257 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2258 | SSL_error_internal(s, (4|64), __FILE__, 2166); | - | ||||||||||||||||||||||||||||||||||||
| 2259 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2260 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2261 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2262 | } | - | ||||||||||||||||||||||||||||||||||||
| 2263 | - | |||||||||||||||||||||||||||||||||||||
| 2264 | return executed 61 times by 3 tests: (c->pkeys + i);return (c->pkeys + i);Executed by:
executed 61 times by 3 tests: return (c->pkeys + i);Executed by:
| 61 | ||||||||||||||||||||||||||||||||||||
| 2265 | } | - | ||||||||||||||||||||||||||||||||||||
| 2266 | - | |||||||||||||||||||||||||||||||||||||
| 2267 | X509 * | - | ||||||||||||||||||||||||||||||||||||
| 2268 | ssl_get_server_send_cert(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2269 | { | - | ||||||||||||||||||||||||||||||||||||
| 2270 | CERT_PKEY *cpk; | - | ||||||||||||||||||||||||||||||||||||
| 2271 | - | |||||||||||||||||||||||||||||||||||||
| 2272 | cpk = ssl_get_server_send_pkey(s); | - | ||||||||||||||||||||||||||||||||||||
| 2273 | if (!cpk
| 0-55 | ||||||||||||||||||||||||||||||||||||
| 2274 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2275 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2276 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2277 | return executed 55 times by 3 tests: (cpk->x509);return (cpk->x509);Executed by:
executed 55 times by 3 tests: return (cpk->x509);Executed by:
| 55 | ||||||||||||||||||||||||||||||||||||
| 2278 | } | - | ||||||||||||||||||||||||||||||||||||
| 2279 | - | |||||||||||||||||||||||||||||||||||||
| 2280 | EVP_PKEY * | - | ||||||||||||||||||||||||||||||||||||
| 2281 | ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd) | - | ||||||||||||||||||||||||||||||||||||
| 2282 | { | - | ||||||||||||||||||||||||||||||||||||
| 2283 | unsigned long alg_a; | - | ||||||||||||||||||||||||||||||||||||
| 2284 | CERT *c; | - | ||||||||||||||||||||||||||||||||||||
| 2285 | int idx = -1; | - | ||||||||||||||||||||||||||||||||||||
| 2286 | - | |||||||||||||||||||||||||||||||||||||
| 2287 | alg_a = cipher->algorithm_auth; | - | ||||||||||||||||||||||||||||||||||||
| 2288 | c = s->cert; | - | ||||||||||||||||||||||||||||||||||||
| 2289 | - | |||||||||||||||||||||||||||||||||||||
| 2290 | if (alg_a & 0x00000001L
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2291 | if (c->pkeys[1].privatekey !=
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2292 | ((void *)0)
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2293 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2294 | idx = 1; never executed: idx = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 2295 | else if (c->pkeys[0].privatekey !=
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2296 | ((void *)0)
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2297 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2298 | idx = 0; executed 41 times by 3 tests: idx = 0;Executed by:
| 41 | ||||||||||||||||||||||||||||||||||||
| 2299 | } executed 41 times by 3 tests: else if ((end of blockExecuted by:
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2300 | (
| 0 | ||||||||||||||||||||||||||||||||||||
| 2301 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2302 | )
| 0 | ||||||||||||||||||||||||||||||||||||
| 2303 | idx = 3; never executed: idx = 3; | 0 | ||||||||||||||||||||||||||||||||||||
| 2304 | if (idx == -1
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2305 | SSL_error_internal(s, (4|64), __FILE__, 2203); | - | ||||||||||||||||||||||||||||||||||||
| 2306 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2307 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2308 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2309 | } | - | ||||||||||||||||||||||||||||||||||||
| 2310 | if (pmd
| 0-41 | ||||||||||||||||||||||||||||||||||||
| 2311 | * executed 41 times by 3 tests: pmd = c->pkeys[idx].digest;*pmd = c->pkeys[idx].digest;Executed by:
executed 41 times by 3 tests: *pmd = c->pkeys[idx].digest;Executed by:
| 41 | ||||||||||||||||||||||||||||||||||||
| 2312 | return executed 41 times by 3 tests: (c->pkeys[idx].privatekey);return (c->pkeys[idx].privatekey);Executed by:
executed 41 times by 3 tests: return (c->pkeys[idx].privatekey);Executed by:
| 41 | ||||||||||||||||||||||||||||||||||||
| 2313 | } | - | ||||||||||||||||||||||||||||||||||||
| 2314 | - | |||||||||||||||||||||||||||||||||||||
| 2315 | DH * | - | ||||||||||||||||||||||||||||||||||||
| 2316 | ssl_get_auto_dh(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2317 | { | - | ||||||||||||||||||||||||||||||||||||
| 2318 | CERT_PKEY *cpk; | - | ||||||||||||||||||||||||||||||||||||
| 2319 | int keylen; | - | ||||||||||||||||||||||||||||||||||||
| 2320 | DH *dhp; | - | ||||||||||||||||||||||||||||||||||||
| 2321 | - | |||||||||||||||||||||||||||||||||||||
| 2322 | if (s->cert->dh_tmp_auto == 2
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2323 | keylen = 1024; | - | ||||||||||||||||||||||||||||||||||||
| 2324 | } never executed: else if ((end of block
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2325 | keylen = 1024; | - | ||||||||||||||||||||||||||||||||||||
| 2326 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2327 | keylen = 3072; never executed: keylen = 3072; | 0 | ||||||||||||||||||||||||||||||||||||
| 2328 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2329 | if ((
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2330 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2331 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2332 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2333 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2334 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2335 | if (cpk->privatekey ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2336 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2337 | || cpk->privatekey->pkey.dh ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2338 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2339 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2340 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2341 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2342 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2343 | keylen = EVP_PKEY_bits(cpk->privatekey); | - | ||||||||||||||||||||||||||||||||||||
| 2344 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2345 | - | |||||||||||||||||||||||||||||||||||||
| 2346 | if ((
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2347 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2348 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2349 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2350 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2351 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2352 | - | |||||||||||||||||||||||||||||||||||||
| 2353 | dhp->g = BN_new(); | - | ||||||||||||||||||||||||||||||||||||
| 2354 | if (dhp->g !=
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2355 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2356 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2357 | BN_set_word(dhp->g, 2); executed 2 times by 1 test: BN_set_word(dhp->g, 2);Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2358 | - | |||||||||||||||||||||||||||||||||||||
| 2359 | if (keylen >= 8192
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2360 | dhp->p = get_rfc3526_prime_8192( never executed: dhp->p = get_rfc3526_prime_8192( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2361 | ((void *)0) never executed: dhp->p = get_rfc3526_prime_8192( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2362 | ); never executed: dhp->p = get_rfc3526_prime_8192( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2363 | else if (keylen >= 4096
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2364 | dhp->p = get_rfc3526_prime_4096( never executed: dhp->p = get_rfc3526_prime_4096( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2365 | ((void *)0) never executed: dhp->p = get_rfc3526_prime_4096( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2366 | ); never executed: dhp->p = get_rfc3526_prime_4096( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2367 | else if (keylen >= 3072
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2368 | dhp->p = get_rfc3526_prime_3072( never executed: dhp->p = get_rfc3526_prime_3072( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2369 | ((void *)0) never executed: dhp->p = get_rfc3526_prime_3072( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2370 | ); never executed: dhp->p = get_rfc3526_prime_3072( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2371 | else if (keylen >= 2048
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2372 | dhp->p = get_rfc3526_prime_2048( executed 2 times by 1 test: dhp->p = get_rfc3526_prime_2048( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2373 | ((void *)0) executed 2 times by 1 test: dhp->p = get_rfc3526_prime_2048( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2374 | ); executed 2 times by 1 test: dhp->p = get_rfc3526_prime_2048( ((void *)0) );Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2375 | else if (keylen >= 1536
| 0 | ||||||||||||||||||||||||||||||||||||
| 2376 | dhp->p = get_rfc3526_prime_1536( never executed: dhp->p = get_rfc3526_prime_1536( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2377 | ((void *)0) never executed: dhp->p = get_rfc3526_prime_1536( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2378 | ); never executed: dhp->p = get_rfc3526_prime_1536( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2379 | else | - | ||||||||||||||||||||||||||||||||||||
| 2380 | dhp->p = get_rfc2409_prime_1024( never executed: dhp->p = get_rfc2409_prime_1024( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2381 | ((void *)0) never executed: dhp->p = get_rfc2409_prime_1024( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2382 | ); never executed: dhp->p = get_rfc2409_prime_1024( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2383 | - | |||||||||||||||||||||||||||||||||||||
| 2384 | if (dhp->p ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2385 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2386 | || dhp->g ==
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2387 | ((void *)0)
| 0-2 | ||||||||||||||||||||||||||||||||||||
| 2388 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2389 | DH_free(dhp); | - | ||||||||||||||||||||||||||||||||||||
| 2390 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2391 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2392 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2393 | } | - | ||||||||||||||||||||||||||||||||||||
| 2394 | return executed 2 times by 1 test: (dhp);return (dhp);Executed by:
executed 2 times by 1 test: return (dhp);Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 2395 | } | - | ||||||||||||||||||||||||||||||||||||
| 2396 | - | |||||||||||||||||||||||||||||||||||||
| 2397 | void | - | ||||||||||||||||||||||||||||||||||||
| 2398 | ssl_update_cache(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
| 2399 | { | - | ||||||||||||||||||||||||||||||||||||
| 2400 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 2401 | - | |||||||||||||||||||||||||||||||||||||
| 2402 | - | |||||||||||||||||||||||||||||||||||||
| 2403 | - | |||||||||||||||||||||||||||||||||||||
| 2404 | - | |||||||||||||||||||||||||||||||||||||
| 2405 | - | |||||||||||||||||||||||||||||||||||||
| 2406 | if (s->session->session_id_length == 0
| 59-67 | ||||||||||||||||||||||||||||||||||||
| 2407 | return; executed 67 times by 2 tests: return;Executed by:
| 67 | ||||||||||||||||||||||||||||||||||||
| 2408 | - | |||||||||||||||||||||||||||||||||||||
| 2409 | i = s->initial_ctx->internal->session_cache_mode; | - | ||||||||||||||||||||||||||||||||||||
| 2410 | if ((
| 0-59 | ||||||||||||||||||||||||||||||||||||
| 2411 | || SSL_CTX_add_session(s->initial_ctx, s->session)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2412 | && (
| 0 | ||||||||||||||||||||||||||||||||||||
| 2413 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2414 | )
| 0 | ||||||||||||||||||||||||||||||||||||
| 2415 | CRYPTO_add_lock(&s->session->references,1,14,__FILE__,2275); | - | ||||||||||||||||||||||||||||||||||||
| 2416 | if (!s->initial_ctx->internal->new_session_cb(s, s->session)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2417 | SSL_SESSION_free(s->session); never executed: SSL_SESSION_free(s->session); | 0 | ||||||||||||||||||||||||||||||||||||
| 2418 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2419 | - | |||||||||||||||||||||||||||||||||||||
| 2420 | - | |||||||||||||||||||||||||||||||||||||
| 2421 | if ((
| 0-59 | ||||||||||||||||||||||||||||||||||||
| 2422 | ((
| 0-59 | ||||||||||||||||||||||||||||||||||||
| 2423 | if ((((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2424 | s->initial_ctx->internal->stats.sess_connect_good :
| 0 | ||||||||||||||||||||||||||||||||||||
| 2425 | s->initial_ctx->internal->stats.sess_accept_good) & 0xff) == 0xff
| 0 | ||||||||||||||||||||||||||||||||||||
| 2426 | SSL_CTX_flush_sessions(s->initial_ctx, time( | - | ||||||||||||||||||||||||||||||||||||
| 2427 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2428 | )); | - | ||||||||||||||||||||||||||||||||||||
| 2429 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2430 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2431 | } executed 59 times by 1 test: end of blockExecuted by:
| 59 | ||||||||||||||||||||||||||||||||||||
| 2432 | - | |||||||||||||||||||||||||||||||||||||
| 2433 | const SSL_METHOD * | - | ||||||||||||||||||||||||||||||||||||
| 2434 | SSL_get_ssl_method(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2435 | { | - | ||||||||||||||||||||||||||||||||||||
| 2436 | return never executed: (s->method);return (s->method);never executed: return (s->method); | 0 | ||||||||||||||||||||||||||||||||||||
| 2437 | } | - | ||||||||||||||||||||||||||||||||||||
| 2438 | - | |||||||||||||||||||||||||||||||||||||
| 2439 | int | - | ||||||||||||||||||||||||||||||||||||
| 2440 | SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
| 2441 | { | - | ||||||||||||||||||||||||||||||||||||
| 2442 | int conn = -1; | - | ||||||||||||||||||||||||||||||||||||
| 2443 | int ret = 1; | - | ||||||||||||||||||||||||||||||||||||
| 2444 | - | |||||||||||||||||||||||||||||||||||||
| 2445 | if (s->method != meth
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 2446 | if (s->internal->handshake_func !=
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 2447 | ((void *)0)
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 2448 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2449 | conn = (s->internal->handshake_func == s->method->internal->ssl_connect); executed 9 times by 1 test: conn = (s->internal->handshake_func == s->method->internal->ssl_connect);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 2450 | - | |||||||||||||||||||||||||||||||||||||
| 2451 | if (s->method->internal->version == meth->internal->version
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 2452 | s->method = meth; executed 9 times by 1 test: s->method = meth;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 2453 | else { | - | ||||||||||||||||||||||||||||||||||||
| 2454 | s->method->internal->ssl_free(s); | - | ||||||||||||||||||||||||||||||||||||
| 2455 | s->method = meth; | - | ||||||||||||||||||||||||||||||||||||
| 2456 | ret = s->method->internal->ssl_new(s); | - | ||||||||||||||||||||||||||||||||||||
| 2457 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2458 | - | |||||||||||||||||||||||||||||||||||||
| 2459 | if (conn == 1
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 2460 | s->internal->handshake_func = meth->internal->ssl_connect; executed 9 times by 1 test: s->internal->handshake_func = meth->internal->ssl_connect;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 2461 | else if (conn == 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 2462 | s->internal->handshake_func = meth->internal->ssl_accept; never executed: s->internal->handshake_func = meth->internal->ssl_accept; | 0 | ||||||||||||||||||||||||||||||||||||
| 2463 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 2464 | return executed 9 times by 1 test: (ret);return (ret);Executed by:
executed 9 times by 1 test: return (ret);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 2465 | } | - | ||||||||||||||||||||||||||||||||||||
| 2466 | - | |||||||||||||||||||||||||||||||||||||
| 2467 | int | - | ||||||||||||||||||||||||||||||||||||
| 2468 | SSL_get_error(const SSL *s, int i) | - | ||||||||||||||||||||||||||||||||||||
| 2469 | { | - | ||||||||||||||||||||||||||||||||||||
| 2470 | int reason; | - | ||||||||||||||||||||||||||||||||||||
| 2471 | unsigned long l; | - | ||||||||||||||||||||||||||||||||||||
| 2472 | BIO *bio; | - | ||||||||||||||||||||||||||||||||||||
| 2473 | - | |||||||||||||||||||||||||||||||||||||
| 2474 | if (i > 0
| 236-2908 | ||||||||||||||||||||||||||||||||||||
| 2475 | return executed 236 times by 1 test: (0);return (0);Executed by:
executed 236 times by 1 test: return (0);Executed by:
| 236 | ||||||||||||||||||||||||||||||||||||
| 2476 | - | |||||||||||||||||||||||||||||||||||||
| 2477 | - | |||||||||||||||||||||||||||||||||||||
| 2478 | - | |||||||||||||||||||||||||||||||||||||
| 2479 | if ((
| 0-2908 | ||||||||||||||||||||||||||||||||||||
| 2480 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2481 | return never executed: (5);return (5);never executed: return (5); | 0 | ||||||||||||||||||||||||||||||||||||
| 2482 | else | - | ||||||||||||||||||||||||||||||||||||
| 2483 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 2484 | } | - | ||||||||||||||||||||||||||||||||||||
| 2485 | - | |||||||||||||||||||||||||||||||||||||
| 2486 | if ((
| 0-2908 | ||||||||||||||||||||||||||||||||||||
| 2487 | bio = SSL_get_rbio(s); | - | ||||||||||||||||||||||||||||||||||||
| 2488 | if (BIO_test_flags(bio, 0x01)
| 0-2346 | ||||||||||||||||||||||||||||||||||||
| 2489 | return executed 2346 times by 2 tests: (2);return (2);Executed by:
executed 2346 times by 2 tests: return (2);Executed by:
| 2346 | ||||||||||||||||||||||||||||||||||||
| 2490 | } else if (BIO_test_flags(bio, 0x02)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2491 | return never executed: (3);return (3);never executed: return (3); | 0 | ||||||||||||||||||||||||||||||||||||
| 2492 | } else if (BIO_test_flags(bio, 0x04)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2493 | reason = BIO_get_retry_reason(bio); | - | ||||||||||||||||||||||||||||||||||||
| 2494 | if (reason == 0x02
| 0 | ||||||||||||||||||||||||||||||||||||
| 2495 | return never executed: (7);return (7);never executed: return (7); | 0 | ||||||||||||||||||||||||||||||||||||
| 2496 | else if (reason == 0x03
| 0 | ||||||||||||||||||||||||||||||||||||
| 2497 | return never executed: (8);return (8);never executed: return (8); | 0 | ||||||||||||||||||||||||||||||||||||
| 2498 | else | - | ||||||||||||||||||||||||||||||||||||
| 2499 | return never executed: (5);return (5);never executed: return (5); | 0 | ||||||||||||||||||||||||||||||||||||
| 2500 | } | - | ||||||||||||||||||||||||||||||||||||
| 2501 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2502 | - | |||||||||||||||||||||||||||||||||||||
| 2503 | if ((
| 0-562 | ||||||||||||||||||||||||||||||||||||
| 2504 | bio = SSL_get_wbio(s); | - | ||||||||||||||||||||||||||||||||||||
| 2505 | if (BIO_test_flags(bio, 0x02)
| 0-562 | ||||||||||||||||||||||||||||||||||||
| 2506 | return executed 562 times by 2 tests: (3);return (3);Executed by:
executed 562 times by 2 tests: return (3);Executed by:
| 562 | ||||||||||||||||||||||||||||||||||||
| 2507 | } else if (BIO_test_flags(bio, 0x01)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2508 | - | |||||||||||||||||||||||||||||||||||||
| 2509 | - | |||||||||||||||||||||||||||||||||||||
| 2510 | - | |||||||||||||||||||||||||||||||||||||
| 2511 | - | |||||||||||||||||||||||||||||||||||||
| 2512 | return never executed: (2);return (2);never executed: return (2); | 0 | ||||||||||||||||||||||||||||||||||||
| 2513 | } else if (BIO_test_flags(bio, 0x04)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2514 | reason = BIO_get_retry_reason(bio); | - | ||||||||||||||||||||||||||||||||||||
| 2515 | if (reason == 0x02
| 0 | ||||||||||||||||||||||||||||||||||||
| 2516 | return never executed: (7);return (7);never executed: return (7); | 0 | ||||||||||||||||||||||||||||||||||||
| 2517 | else if (reason == 0x03
| 0 | ||||||||||||||||||||||||||||||||||||
| 2518 | return never executed: (8);return (8);never executed: return (8); | 0 | ||||||||||||||||||||||||||||||||||||
| 2519 | else | - | ||||||||||||||||||||||||||||||||||||
| 2520 | return never executed: (5);return (5);never executed: return (5); | 0 | ||||||||||||||||||||||||||||||||||||
| 2521 | } | - | ||||||||||||||||||||||||||||||||||||
| 2522 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2523 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2524 | return never executed: (4);return (4);never executed: return (4); | 0 | ||||||||||||||||||||||||||||||||||||
| 2525 | } | - | ||||||||||||||||||||||||||||||||||||
| 2526 | - | |||||||||||||||||||||||||||||||||||||
| 2527 | if (i == 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 2528 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2529 | ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2530 | return never executed: (6);return (6);never executed: return (6); | 0 | ||||||||||||||||||||||||||||||||||||
| 2531 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2532 | return never executed: (5);return (5);never executed: return (5); | 0 | ||||||||||||||||||||||||||||||||||||
| 2533 | } | - | ||||||||||||||||||||||||||||||||||||
| 2534 | - | |||||||||||||||||||||||||||||||||||||
| 2535 | int | - | ||||||||||||||||||||||||||||||||||||
| 2536 | SSL_do_handshake(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2537 | { | - | ||||||||||||||||||||||||||||||||||||
| 2538 | int ret = 1; | - | ||||||||||||||||||||||||||||||||||||
| 2539 | - | |||||||||||||||||||||||||||||||||||||
| 2540 | if (s->internal->handshake_func ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2541 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2542 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2543 | SSL_error_internal(s, 144, __FILE__, 2407); | - | ||||||||||||||||||||||||||||||||||||
| 2544 | return never executed: (-1);return (-1);never executed: return (-1); | 0 | ||||||||||||||||||||||||||||||||||||
| 2545 | } | - | ||||||||||||||||||||||||||||||||||||
| 2546 | - | |||||||||||||||||||||||||||||||||||||
| 2547 | s->method->internal->ssl_renegotiate_check(s); | - | ||||||||||||||||||||||||||||||||||||
| 2548 | - | |||||||||||||||||||||||||||||||||||||
| 2549 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2550 | ret = s->internal->handshake_func(s); | - | ||||||||||||||||||||||||||||||||||||
| 2551 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2552 | return never executed: (ret);return (ret);never executed: return (ret); | 0 | ||||||||||||||||||||||||||||||||||||
| 2553 | } | - | ||||||||||||||||||||||||||||||||||||
| 2554 | - | |||||||||||||||||||||||||||||||||||||
| 2555 | - | |||||||||||||||||||||||||||||||||||||
| 2556 | - | |||||||||||||||||||||||||||||||||||||
| 2557 | - | |||||||||||||||||||||||||||||||||||||
| 2558 | - | |||||||||||||||||||||||||||||||||||||
| 2559 | void | - | ||||||||||||||||||||||||||||||||||||
| 2560 | SSL_set_accept_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2561 | { | - | ||||||||||||||||||||||||||||||||||||
| 2562 | s->server = 1; | - | ||||||||||||||||||||||||||||||||||||
| 2563 | s->internal->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2564 | (s->s3->internal)->hs.state = 0x2000|0x4000; | - | ||||||||||||||||||||||||||||||||||||
| 2565 | s->internal->handshake_func = s->method->internal->ssl_accept; | - | ||||||||||||||||||||||||||||||||||||
| 2566 | ssl_clear_cipher_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 2567 | } executed 65 times by 3 tests: end of blockExecuted by:
| 65 | ||||||||||||||||||||||||||||||||||||
| 2568 | - | |||||||||||||||||||||||||||||||||||||
| 2569 | void | - | ||||||||||||||||||||||||||||||||||||
| 2570 | SSL_set_connect_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2571 | { | - | ||||||||||||||||||||||||||||||||||||
| 2572 | s->server = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2573 | s->internal->shutdown = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2574 | (s->s3->internal)->hs.state = 0x1000|0x4000; | - | ||||||||||||||||||||||||||||||||||||
| 2575 | s->internal->handshake_func = s->method->internal->ssl_connect; | - | ||||||||||||||||||||||||||||||||||||
| 2576 | ssl_clear_cipher_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 2577 | } executed 74 times by 3 tests: end of blockExecuted by:
| 74 | ||||||||||||||||||||||||||||||||||||
| 2578 | - | |||||||||||||||||||||||||||||||||||||
| 2579 | int | - | ||||||||||||||||||||||||||||||||||||
| 2580 | ssl_undefined_function(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2581 | { | - | ||||||||||||||||||||||||||||||||||||
| 2582 | SSL_error_internal(s, (2|64), __FILE__, 2446); | - | ||||||||||||||||||||||||||||||||||||
| 2583 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2584 | } | - | ||||||||||||||||||||||||||||||||||||
| 2585 | - | |||||||||||||||||||||||||||||||||||||
| 2586 | int | - | ||||||||||||||||||||||||||||||||||||
| 2587 | ssl_undefined_void_function(void) | - | ||||||||||||||||||||||||||||||||||||
| 2588 | { | - | ||||||||||||||||||||||||||||||||||||
| 2589 | ERR_put_error(20,(0xfff),((2|64)),__FILE__,2453); | - | ||||||||||||||||||||||||||||||||||||
| 2590 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2591 | } | - | ||||||||||||||||||||||||||||||||||||
| 2592 | - | |||||||||||||||||||||||||||||||||||||
| 2593 | int | - | ||||||||||||||||||||||||||||||||||||
| 2594 | ssl_undefined_const_function(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2595 | { | - | ||||||||||||||||||||||||||||||||||||
| 2596 | SSL_error_internal(s, (2|64), __FILE__, 2460); | - | ||||||||||||||||||||||||||||||||||||
| 2597 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2598 | } | - | ||||||||||||||||||||||||||||||||||||
| 2599 | - | |||||||||||||||||||||||||||||||||||||
| 2600 | const char * | - | ||||||||||||||||||||||||||||||||||||
| 2601 | ssl_version_string(int ver) | - | ||||||||||||||||||||||||||||||||||||
| 2602 | { | - | ||||||||||||||||||||||||||||||||||||
| 2603 | switch (ver) { | - | ||||||||||||||||||||||||||||||||||||
| 2604 | case executed 11 times by 1 test: 0xFEFF:case 0xFEFF:Executed by:
executed 11 times by 1 test: case 0xFEFF:Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
| 2605 | return executed 11 times by 1 test: ("DTLSv1");return ("DTLSv1");Executed by:
executed 11 times by 1 test: return ("DTLSv1");Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||
| 2606 | case executed 18 times by 1 test: 0x0301:case 0x0301:Executed by:
executed 18 times by 1 test: case 0x0301:Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 2607 | return executed 18 times by 1 test: ("TLSv1");return ("TLSv1");Executed by:
executed 18 times by 1 test: return ("TLSv1");Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 2608 | case never executed: 0x0302:case 0x0302:never executed: case 0x0302: | 0 | ||||||||||||||||||||||||||||||||||||
| 2609 | return never executed: ("TLSv1.1");return ("TLSv1.1");never executed: return ("TLSv1.1"); | 0 | ||||||||||||||||||||||||||||||||||||
| 2610 | case executed 38 times by 2 tests: 0x0303:case 0x0303:Executed by:
executed 38 times by 2 tests: case 0x0303:Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||
| 2611 | return executed 38 times by 2 tests: ("TLSv1.2");return ("TLSv1.2");Executed by:
executed 38 times by 2 tests: return ("TLSv1.2");Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||
| 2612 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
| 2613 | return never executed: ("unknown");return ("unknown");never executed: return ("unknown"); | 0 | ||||||||||||||||||||||||||||||||||||
| 2614 | } | - | ||||||||||||||||||||||||||||||||||||
| 2615 | } | - | ||||||||||||||||||||||||||||||||||||
| 2616 | - | |||||||||||||||||||||||||||||||||||||
| 2617 | const char * | - | ||||||||||||||||||||||||||||||||||||
| 2618 | SSL_get_version(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2619 | { | - | ||||||||||||||||||||||||||||||||||||
| 2620 | return executed 67 times by 2 tests: ssl_version_string(s->version);return ssl_version_string(s->version);Executed by:
executed 67 times by 2 tests: return ssl_version_string(s->version);Executed by:
| 67 | ||||||||||||||||||||||||||||||||||||
| 2621 | } | - | ||||||||||||||||||||||||||||||||||||
| 2622 | - | |||||||||||||||||||||||||||||||||||||
| 2623 | SSL * | - | ||||||||||||||||||||||||||||||||||||
| 2624 | SSL_dup(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2625 | { | - | ||||||||||||||||||||||||||||||||||||
| 2626 | struct stack_st_X509_NAME *sk; | - | ||||||||||||||||||||||||||||||||||||
| 2627 | X509_NAME *xn; | - | ||||||||||||||||||||||||||||||||||||
| 2628 | SSL *ret; | - | ||||||||||||||||||||||||||||||||||||
| 2629 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 2630 | - | |||||||||||||||||||||||||||||||||||||
| 2631 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2632 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2633 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2634 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2635 | - | |||||||||||||||||||||||||||||||||||||
| 2636 | ret->version = s->version; | - | ||||||||||||||||||||||||||||||||||||
| 2637 | ret->internal->type = s->internal->type; | - | ||||||||||||||||||||||||||||||||||||
| 2638 | ret->method = s->method; | - | ||||||||||||||||||||||||||||||||||||
| 2639 | - | |||||||||||||||||||||||||||||||||||||
| 2640 | if (s->session !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2641 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2642 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2643 | if (!SSL_copy_session_id(ret, s)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2644 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2645 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2646 | - | |||||||||||||||||||||||||||||||||||||
| 2647 | - | |||||||||||||||||||||||||||||||||||||
| 2648 | - | |||||||||||||||||||||||||||||||||||||
| 2649 | - | |||||||||||||||||||||||||||||||||||||
| 2650 | - | |||||||||||||||||||||||||||||||||||||
| 2651 | - | |||||||||||||||||||||||||||||||||||||
| 2652 | - | |||||||||||||||||||||||||||||||||||||
| 2653 | ret->method->internal->ssl_free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 2654 | ret->method = s->method; | - | ||||||||||||||||||||||||||||||||||||
| 2655 | ret->method->internal->ssl_new(ret); | - | ||||||||||||||||||||||||||||||||||||
| 2656 | - | |||||||||||||||||||||||||||||||||||||
| 2657 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2658 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2659 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2660 | ssl_cert_free(ret->cert); | - | ||||||||||||||||||||||||||||||||||||
| 2661 | ret->cert = ssl_cert_dup(s->cert); | - | ||||||||||||||||||||||||||||||||||||
| 2662 | if (ret->cert ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2663 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2664 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2665 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2666 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2667 | - | |||||||||||||||||||||||||||||||||||||
| 2668 | if (!SSL_set_session_id_context(ret, s->sid_ctx,
| 0 | ||||||||||||||||||||||||||||||||||||
| 2669 | s->sid_ctx_length)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2670 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2671 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2672 | - | |||||||||||||||||||||||||||||||||||||
| 2673 | ret->internal->options = s->internal->options; | - | ||||||||||||||||||||||||||||||||||||
| 2674 | ret->internal->mode = s->internal->mode; | - | ||||||||||||||||||||||||||||||||||||
| 2675 | SSL_ctrl(ret,51,SSL_ctrl(s,50,0, | - | ||||||||||||||||||||||||||||||||||||
| 2676 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2677 | ), | - | ||||||||||||||||||||||||||||||||||||
| 2678 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2679 | ); | - | ||||||||||||||||||||||||||||||||||||
| 2680 | SSL_set_read_ahead(ret, SSL_get_read_ahead(s)); | - | ||||||||||||||||||||||||||||||||||||
| 2681 | ret->internal->msg_callback = s->internal->msg_callback; | - | ||||||||||||||||||||||||||||||||||||
| 2682 | ret->internal->msg_callback_arg = s->internal->msg_callback_arg; | - | ||||||||||||||||||||||||||||||||||||
| 2683 | SSL_set_verify(ret, SSL_get_verify_mode(s), | - | ||||||||||||||||||||||||||||||||||||
| 2684 | SSL_get_verify_callback(s)); | - | ||||||||||||||||||||||||||||||||||||
| 2685 | SSL_set_verify_depth(ret, SSL_get_verify_depth(s)); | - | ||||||||||||||||||||||||||||||||||||
| 2686 | ret->internal->generate_session_id = s->internal->generate_session_id; | - | ||||||||||||||||||||||||||||||||||||
| 2687 | - | |||||||||||||||||||||||||||||||||||||
| 2688 | SSL_set_info_callback(ret, SSL_get_info_callback(s)); | - | ||||||||||||||||||||||||||||||||||||
| 2689 | - | |||||||||||||||||||||||||||||||||||||
| 2690 | ret->internal->debug = s->internal->debug; | - | ||||||||||||||||||||||||||||||||||||
| 2691 | - | |||||||||||||||||||||||||||||||||||||
| 2692 | - | |||||||||||||||||||||||||||||||||||||
| 2693 | if (!CRYPTO_dup_ex_data(1,
| 0 | ||||||||||||||||||||||||||||||||||||
| 2694 | &ret->internal->ex_data, &s->internal->ex_data)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2695 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2696 | - | |||||||||||||||||||||||||||||||||||||
| 2697 | - | |||||||||||||||||||||||||||||||||||||
| 2698 | if (s->rbio !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2699 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2700 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2701 | if (!BIO_ctrl(s->rbio,12,0,(char *)((char *)&ret->rbio))
| 0 | ||||||||||||||||||||||||||||||||||||
| 2702 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2703 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2704 | if (s->wbio !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2705 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2706 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2707 | if (s->wbio != s->rbio
| 0 | ||||||||||||||||||||||||||||||||||||
| 2708 | if (!BIO_ctrl(s->wbio,12,0,(char *)((char *)&ret->wbio))
| 0 | ||||||||||||||||||||||||||||||||||||
| 2709 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2710 | } never executed: elseend of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2711 | ret->wbio = ret->rbio; never executed: ret->wbio = ret->rbio; | 0 | ||||||||||||||||||||||||||||||||||||
| 2712 | } | - | ||||||||||||||||||||||||||||||||||||
| 2713 | ret->internal->rwstate = s->internal->rwstate; | - | ||||||||||||||||||||||||||||||||||||
| 2714 | ret->internal->in_handshake = s->internal->in_handshake; | - | ||||||||||||||||||||||||||||||||||||
| 2715 | ret->internal->handshake_func = s->internal->handshake_func; | - | ||||||||||||||||||||||||||||||||||||
| 2716 | ret->server = s->server; | - | ||||||||||||||||||||||||||||||||||||
| 2717 | ret->internal->renegotiate = s->internal->renegotiate; | - | ||||||||||||||||||||||||||||||||||||
| 2718 | ret->internal->new_session = s->internal->new_session; | - | ||||||||||||||||||||||||||||||||||||
| 2719 | ret->internal->quiet_shutdown = s->internal->quiet_shutdown; | - | ||||||||||||||||||||||||||||||||||||
| 2720 | ret->internal->shutdown = s->internal->shutdown; | - | ||||||||||||||||||||||||||||||||||||
| 2721 | - | |||||||||||||||||||||||||||||||||||||
| 2722 | (ret->s3->internal)->hs.state = (s->s3->internal)->hs.state; | - | ||||||||||||||||||||||||||||||||||||
| 2723 | ret->internal->rstate = s->internal->rstate; | - | ||||||||||||||||||||||||||||||||||||
| 2724 | - | |||||||||||||||||||||||||||||||||||||
| 2725 | - | |||||||||||||||||||||||||||||||||||||
| 2726 | - | |||||||||||||||||||||||||||||||||||||
| 2727 | - | |||||||||||||||||||||||||||||||||||||
| 2728 | - | |||||||||||||||||||||||||||||||||||||
| 2729 | ret->internal->init_num = 0; | - | ||||||||||||||||||||||||||||||||||||
| 2730 | - | |||||||||||||||||||||||||||||||||||||
| 2731 | ret->internal->hit = s->internal->hit; | - | ||||||||||||||||||||||||||||||||||||
| 2732 | - | |||||||||||||||||||||||||||||||||||||
| 2733 | X509_VERIFY_PARAM_inherit(ret->param, s->param); | - | ||||||||||||||||||||||||||||||||||||
| 2734 | - | |||||||||||||||||||||||||||||||||||||
| 2735 | - | |||||||||||||||||||||||||||||||||||||
| 2736 | if (s->cipher_list !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2737 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2738 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2739 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2740 | (struct stack_st_SSL_CIPHER *)sk_dup(((_STACK*) (1 ? s->cipher_list : (struct stack_st_SSL_CIPHER*)0)))) ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2741 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2742 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2743 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2744 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2745 | if (s->internal->cipher_list_by_id !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2746 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2747 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2748 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2749 | (struct stack_st_SSL_CIPHER *)sk_dup(((_STACK*) (1 ? s->internal->cipher_list_by_id : (struct stack_st_SSL_CIPHER*)0)))) ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2750 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2751 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2752 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2753 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2754 | - | |||||||||||||||||||||||||||||||||||||
| 2755 | - | |||||||||||||||||||||||||||||||||||||
| 2756 | if (s->internal->client_CA !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2757 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2758 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2759 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 2760 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2761 | ) goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2762 | ret->internal->client_CA = sk; | - | ||||||||||||||||||||||||||||||||||||
| 2763 | for (i = 0; i < sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_X509_NAME*)0)))
| 0 | ||||||||||||||||||||||||||||||||||||
| 2764 | xn = ((X509_NAME *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_X509_NAME*)0)), (i))); | - | ||||||||||||||||||||||||||||||||||||
| 2765 | if (sk_set(((_STACK*) (1 ? (sk) : (struct stack_st_X509_NAME*)0)), (i), ((void*) (1 ? (X509_NAME_dup(xn)) : (X509_NAME*)0)))
| 0 | ||||||||||||||||||||||||||||||||||||
| 2766 | ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2767 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2768 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2769 | X509_NAME_free(xn); | - | ||||||||||||||||||||||||||||||||||||
| 2770 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 2771 | } | - | ||||||||||||||||||||||||||||||||||||
| 2772 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2773 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2774 | - | |||||||||||||||||||||||||||||||||||||
| 2775 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||
| 2776 | err: | - | ||||||||||||||||||||||||||||||||||||
| 2777 | SSL_free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 2778 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 2779 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 2780 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 2781 | } | - | ||||||||||||||||||||||||||||||||||||
| 2782 | - | |||||||||||||||||||||||||||||||||||||
| 2783 | void | - | ||||||||||||||||||||||||||||||||||||
| 2784 | ssl_clear_cipher_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2785 | { | - | ||||||||||||||||||||||||||||||||||||
| 2786 | ssl_clear_cipher_read_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 2787 | ssl_clear_cipher_write_state(s); | - | ||||||||||||||||||||||||||||||||||||
| 2788 | } executed 675 times by 11 tests: end of blockExecuted by:
| 675 | ||||||||||||||||||||||||||||||||||||
| 2789 | - | |||||||||||||||||||||||||||||||||||||
| 2790 | void | - | ||||||||||||||||||||||||||||||||||||
| 2791 | ssl_clear_cipher_read_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2792 | { | - | ||||||||||||||||||||||||||||||||||||
| 2793 | EVP_CIPHER_CTX_free(s->enc_read_ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2794 | s->enc_read_ctx = | - | ||||||||||||||||||||||||||||||||||||
| 2795 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2796 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2797 | EVP_MD_CTX_free(s->read_hash); | - | ||||||||||||||||||||||||||||||||||||
| 2798 | s->read_hash = | - | ||||||||||||||||||||||||||||||||||||
| 2799 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2800 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2801 | - | |||||||||||||||||||||||||||||||||||||
| 2802 | if (s->internal->aead_read_ctx !=
| 46-755 | ||||||||||||||||||||||||||||||||||||
| 2803 | ((void *)0)
| 46-755 | ||||||||||||||||||||||||||||||||||||
| 2804 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2805 | EVP_AEAD_CTX_cleanup(&s->internal->aead_read_ctx->ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2806 | free(s->internal->aead_read_ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2807 | s->internal->aead_read_ctx = | - | ||||||||||||||||||||||||||||||||||||
| 2808 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2809 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2810 | } executed 46 times by 2 tests: end of blockExecuted by:
| 46 | ||||||||||||||||||||||||||||||||||||
| 2811 | } executed 801 times by 11 tests: end of blockExecuted by:
| 801 | ||||||||||||||||||||||||||||||||||||
| 2812 | - | |||||||||||||||||||||||||||||||||||||
| 2813 | void | - | ||||||||||||||||||||||||||||||||||||
| 2814 | ssl_clear_cipher_write_state(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2815 | { | - | ||||||||||||||||||||||||||||||||||||
| 2816 | EVP_CIPHER_CTX_free(s->internal->enc_write_ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2817 | s->internal->enc_write_ctx = | - | ||||||||||||||||||||||||||||||||||||
| 2818 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2819 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2820 | EVP_MD_CTX_free(s->internal->write_hash); | - | ||||||||||||||||||||||||||||||||||||
| 2821 | s->internal->write_hash = | - | ||||||||||||||||||||||||||||||||||||
| 2822 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2823 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2824 | - | |||||||||||||||||||||||||||||||||||||
| 2825 | if (s->internal->aead_write_ctx !=
| 46-733 | ||||||||||||||||||||||||||||||||||||
| 2826 | ((void *)0)
| 46-733 | ||||||||||||||||||||||||||||||||||||
| 2827 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2828 | EVP_AEAD_CTX_cleanup(&s->internal->aead_write_ctx->ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2829 | free(s->internal->aead_write_ctx); | - | ||||||||||||||||||||||||||||||||||||
| 2830 | s->internal->aead_write_ctx = | - | ||||||||||||||||||||||||||||||||||||
| 2831 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2832 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2833 | } executed 46 times by 2 tests: end of blockExecuted by:
| 46 | ||||||||||||||||||||||||||||||||||||
| 2834 | } executed 779 times by 11 tests: end of blockExecuted by:
| 779 | ||||||||||||||||||||||||||||||||||||
| 2835 | - | |||||||||||||||||||||||||||||||||||||
| 2836 | - | |||||||||||||||||||||||||||||||||||||
| 2837 | X509 * | - | ||||||||||||||||||||||||||||||||||||
| 2838 | SSL_get_certificate(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2839 | { | - | ||||||||||||||||||||||||||||||||||||
| 2840 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2841 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2842 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2843 | return never executed: (s->cert->key->x509);return (s->cert->key->x509);never executed: return (s->cert->key->x509); | 0 | ||||||||||||||||||||||||||||||||||||
| 2844 | else | - | ||||||||||||||||||||||||||||||||||||
| 2845 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2846 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2847 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2848 | } | - | ||||||||||||||||||||||||||||||||||||
| 2849 | - | |||||||||||||||||||||||||||||||||||||
| 2850 | - | |||||||||||||||||||||||||||||||||||||
| 2851 | EVP_PKEY * | - | ||||||||||||||||||||||||||||||||||||
| 2852 | SSL_get_privatekey(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2853 | { | - | ||||||||||||||||||||||||||||||||||||
| 2854 | if (s->cert !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 2855 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2856 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2857 | return never executed: (s->cert->key->privatekey);return (s->cert->key->privatekey);never executed: return (s->cert->key->privatekey); | 0 | ||||||||||||||||||||||||||||||||||||
| 2858 | else | - | ||||||||||||||||||||||||||||||||||||
| 2859 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2860 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2861 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2862 | } | - | ||||||||||||||||||||||||||||||||||||
| 2863 | - | |||||||||||||||||||||||||||||||||||||
| 2864 | const SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 2865 | SSL_get_current_cipher(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2866 | { | - | ||||||||||||||||||||||||||||||||||||
| 2867 | if ((
| 0-67 | ||||||||||||||||||||||||||||||||||||
| 2868 | ((void *)0)
| 0-67 | ||||||||||||||||||||||||||||||||||||
| 2869 | )
| 0-67 | ||||||||||||||||||||||||||||||||||||
| 2870 | ((void *)0)
| 0-67 | ||||||||||||||||||||||||||||||||||||
| 2871 | )
| 0-67 | ||||||||||||||||||||||||||||||||||||
| 2872 | return executed 67 times by 2 tests: (s->session->cipher);return (s->session->cipher);Executed by:
executed 67 times by 2 tests: return (s->session->cipher);Executed by:
| 67 | ||||||||||||||||||||||||||||||||||||
| 2873 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2874 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2875 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2876 | } | - | ||||||||||||||||||||||||||||||||||||
| 2877 | const void * | - | ||||||||||||||||||||||||||||||||||||
| 2878 | SSL_get_current_compression(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2879 | { | - | ||||||||||||||||||||||||||||||||||||
| 2880 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2881 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2882 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2883 | } | - | ||||||||||||||||||||||||||||||||||||
| 2884 | - | |||||||||||||||||||||||||||||||||||||
| 2885 | const void * | - | ||||||||||||||||||||||||||||||||||||
| 2886 | SSL_get_current_expansion(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2887 | { | - | ||||||||||||||||||||||||||||||||||||
| 2888 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2889 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2890 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 2891 | } | - | ||||||||||||||||||||||||||||||||||||
| 2892 | - | |||||||||||||||||||||||||||||||||||||
| 2893 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 2894 | SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out) | - | ||||||||||||||||||||||||||||||||||||
| 2895 | { | - | ||||||||||||||||||||||||||||||||||||
| 2896 | size_t len = sizeof(s->s3->client_random); | - | ||||||||||||||||||||||||||||||||||||
| 2897 | - | |||||||||||||||||||||||||||||||||||||
| 2898 | if (out ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2899 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2900 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2901 | return never executed: len;return len;never executed: return len; | 0 | ||||||||||||||||||||||||||||||||||||
| 2902 | - | |||||||||||||||||||||||||||||||||||||
| 2903 | if (len > max_out
| 0 | ||||||||||||||||||||||||||||||||||||
| 2904 | len = max_out; never executed: len = max_out; | 0 | ||||||||||||||||||||||||||||||||||||
| 2905 | - | |||||||||||||||||||||||||||||||||||||
| 2906 | memcpy(out, s->s3->client_random, len); | - | ||||||||||||||||||||||||||||||||||||
| 2907 | - | |||||||||||||||||||||||||||||||||||||
| 2908 | return never executed: len;return len;never executed: return len; | 0 | ||||||||||||||||||||||||||||||||||||
| 2909 | } | - | ||||||||||||||||||||||||||||||||||||
| 2910 | - | |||||||||||||||||||||||||||||||||||||
| 2911 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 2912 | SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out) | - | ||||||||||||||||||||||||||||||||||||
| 2913 | { | - | ||||||||||||||||||||||||||||||||||||
| 2914 | size_t len = sizeof(s->s3->server_random); | - | ||||||||||||||||||||||||||||||||||||
| 2915 | - | |||||||||||||||||||||||||||||||||||||
| 2916 | if (out ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 2917 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 2918 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2919 | return never executed: len;return len;never executed: return len; | 0 | ||||||||||||||||||||||||||||||||||||
| 2920 | - | |||||||||||||||||||||||||||||||||||||
| 2921 | if (len > max_out
| 0 | ||||||||||||||||||||||||||||||||||||
| 2922 | len = max_out; never executed: len = max_out; | 0 | ||||||||||||||||||||||||||||||||||||
| 2923 | - | |||||||||||||||||||||||||||||||||||||
| 2924 | memcpy(out, s->s3->server_random, len); | - | ||||||||||||||||||||||||||||||||||||
| 2925 | - | |||||||||||||||||||||||||||||||||||||
| 2926 | return never executed: len;return len;never executed: return len; | 0 | ||||||||||||||||||||||||||||||||||||
| 2927 | } | - | ||||||||||||||||||||||||||||||||||||
| 2928 | - | |||||||||||||||||||||||||||||||||||||
| 2929 | int | - | ||||||||||||||||||||||||||||||||||||
| 2930 | ssl_init_wbio_buffer(SSL *s, int push) | - | ||||||||||||||||||||||||||||||||||||
| 2931 | { | - | ||||||||||||||||||||||||||||||||||||
| 2932 | BIO *bbio; | - | ||||||||||||||||||||||||||||||||||||
| 2933 | - | |||||||||||||||||||||||||||||||||||||
| 2934 | if (s->bbio ==
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 2935 | ((void *)0)
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 2936 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 2937 | bbio = BIO_new(BIO_f_buffer()); | - | ||||||||||||||||||||||||||||||||||||
| 2938 | if (bbio ==
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 2939 | ((void *)0)
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 2940 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2941 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2942 | s->bbio = bbio; | - | ||||||||||||||||||||||||||||||||||||
| 2943 | } executed 139 times by 4 tests: else {end of blockExecuted by:
| 139 | ||||||||||||||||||||||||||||||||||||
| 2944 | bbio = s->bbio; | - | ||||||||||||||||||||||||||||||||||||
| 2945 | if (s->bbio == s->wbio
| 0 | ||||||||||||||||||||||||||||||||||||
| 2946 | s->wbio = BIO_pop(s->wbio); never executed: s->wbio = BIO_pop(s->wbio); | 0 | ||||||||||||||||||||||||||||||||||||
| 2947 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2948 | (void)(int)BIO_ctrl(bbio,1,0, | - | ||||||||||||||||||||||||||||||||||||
| 2949 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2950 | ); | - | ||||||||||||||||||||||||||||||||||||
| 2951 | - | |||||||||||||||||||||||||||||||||||||
| 2952 | if (!BIO_int_ctrl(bbio,117,1,0)
| 0-139 | ||||||||||||||||||||||||||||||||||||
| 2953 | SSL_error_internal(s, 7, __FILE__, 2741); | - | ||||||||||||||||||||||||||||||||||||
| 2954 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||
| 2955 | } | - | ||||||||||||||||||||||||||||||||||||
| 2956 | if (push
| 65-74 | ||||||||||||||||||||||||||||||||||||
| 2957 | if (s->wbio != bbio
| 0-65 | ||||||||||||||||||||||||||||||||||||
| 2958 | s->wbio = BIO_push(bbio, s->wbio); executed 65 times by 3 tests: s->wbio = BIO_push(bbio, s->wbio);Executed by:
| 65 | ||||||||||||||||||||||||||||||||||||
| 2959 | } executed 65 times by 3 tests: else {end of blockExecuted by:
| 65 | ||||||||||||||||||||||||||||||||||||
| 2960 | if (s->wbio == bbio
| 0-74 | ||||||||||||||||||||||||||||||||||||
| 2961 | s->wbio = BIO_pop(bbio); never executed: s->wbio = BIO_pop(bbio); | 0 | ||||||||||||||||||||||||||||||||||||
| 2962 | } executed 74 times by 3 tests: end of blockExecuted by:
| 74 | ||||||||||||||||||||||||||||||||||||
| 2963 | return executed 139 times by 4 tests: (1);return (1);Executed by:
executed 139 times by 4 tests: return (1);Executed by:
| 139 | ||||||||||||||||||||||||||||||||||||
| 2964 | } | - | ||||||||||||||||||||||||||||||||||||
| 2965 | - | |||||||||||||||||||||||||||||||||||||
| 2966 | void | - | ||||||||||||||||||||||||||||||||||||
| 2967 | ssl_free_wbio_buffer(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 2968 | { | - | ||||||||||||||||||||||||||||||||||||
| 2969 | if (s ==
| 0-871 | ||||||||||||||||||||||||||||||||||||
| 2970 | ((void *)0)
| 0-871 | ||||||||||||||||||||||||||||||||||||
| 2971 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2972 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 2973 | - | |||||||||||||||||||||||||||||||||||||
| 2974 | if (s->bbio ==
| 126-745 | ||||||||||||||||||||||||||||||||||||
| 2975 | ((void *)0)
| 126-745 | ||||||||||||||||||||||||||||||||||||
| 2976 | ) | - | ||||||||||||||||||||||||||||||||||||
| 2977 | return; executed 745 times by 11 tests: return;Executed by:
| 745 | ||||||||||||||||||||||||||||||||||||
| 2978 | - | |||||||||||||||||||||||||||||||||||||
| 2979 | if (s->bbio == s->wbio
| 0-126 | ||||||||||||||||||||||||||||||||||||
| 2980 | - | |||||||||||||||||||||||||||||||||||||
| 2981 | s->wbio = BIO_pop(s->wbio); | - | ||||||||||||||||||||||||||||||||||||
| 2982 | } executed 126 times by 2 tests: end of blockExecuted by:
| 126 | ||||||||||||||||||||||||||||||||||||
| 2983 | BIO_free(s->bbio); | - | ||||||||||||||||||||||||||||||||||||
| 2984 | s->bbio = | - | ||||||||||||||||||||||||||||||||||||
| 2985 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 2986 | ; | - | ||||||||||||||||||||||||||||||||||||
| 2987 | } executed 126 times by 2 tests: end of blockExecuted by:
| 126 | ||||||||||||||||||||||||||||||||||||
| 2988 | - | |||||||||||||||||||||||||||||||||||||
| 2989 | void | - | ||||||||||||||||||||||||||||||||||||
| 2990 | SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode) | - | ||||||||||||||||||||||||||||||||||||
| 2991 | { | - | ||||||||||||||||||||||||||||||||||||
| 2992 | ctx->internal->quiet_shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
| 2993 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 2994 | - | |||||||||||||||||||||||||||||||||||||
| 2995 | int | - | ||||||||||||||||||||||||||||||||||||
| 2996 | SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 2997 | { | - | ||||||||||||||||||||||||||||||||||||
| 2998 | return never executed: (ctx->internal->quiet_shutdown);return (ctx->internal->quiet_shutdown);never executed: return (ctx->internal->quiet_shutdown); | 0 | ||||||||||||||||||||||||||||||||||||
| 2999 | } | - | ||||||||||||||||||||||||||||||||||||
| 3000 | - | |||||||||||||||||||||||||||||||||||||
| 3001 | void | - | ||||||||||||||||||||||||||||||||||||
| 3002 | SSL_set_quiet_shutdown(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
| 3003 | { | - | ||||||||||||||||||||||||||||||||||||
| 3004 | s->internal->quiet_shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
| 3005 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3006 | - | |||||||||||||||||||||||||||||||||||||
| 3007 | int | - | ||||||||||||||||||||||||||||||||||||
| 3008 | SSL_get_quiet_shutdown(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3009 | { | - | ||||||||||||||||||||||||||||||||||||
| 3010 | return never executed: (s->internal->quiet_shutdown);return (s->internal->quiet_shutdown);never executed: return (s->internal->quiet_shutdown); | 0 | ||||||||||||||||||||||||||||||||||||
| 3011 | } | - | ||||||||||||||||||||||||||||||||||||
| 3012 | - | |||||||||||||||||||||||||||||||||||||
| 3013 | void | - | ||||||||||||||||||||||||||||||||||||
| 3014 | SSL_set_shutdown(SSL *s, int mode) | - | ||||||||||||||||||||||||||||||||||||
| 3015 | { | - | ||||||||||||||||||||||||||||||||||||
| 3016 | s->internal->shutdown = mode; | - | ||||||||||||||||||||||||||||||||||||
| 3017 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3018 | - | |||||||||||||||||||||||||||||||||||||
| 3019 | int | - | ||||||||||||||||||||||||||||||||||||
| 3020 | SSL_get_shutdown(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3021 | { | - | ||||||||||||||||||||||||||||||||||||
| 3022 | return never executed: (s->internal->shutdown);return (s->internal->shutdown);never executed: return (s->internal->shutdown); | 0 | ||||||||||||||||||||||||||||||||||||
| 3023 | } | - | ||||||||||||||||||||||||||||||||||||
| 3024 | - | |||||||||||||||||||||||||||||||||||||
| 3025 | int | - | ||||||||||||||||||||||||||||||||||||
| 3026 | SSL_version(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3027 | { | - | ||||||||||||||||||||||||||||||||||||
| 3028 | return never executed: (s->version);return (s->version);never executed: return (s->version); | 0 | ||||||||||||||||||||||||||||||||||||
| 3029 | } | - | ||||||||||||||||||||||||||||||||||||
| 3030 | - | |||||||||||||||||||||||||||||||||||||
| 3031 | SSL_CTX * | - | ||||||||||||||||||||||||||||||||||||
| 3032 | SSL_get_SSL_CTX(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 3033 | { | - | ||||||||||||||||||||||||||||||||||||
| 3034 | return never executed: (ssl->ctx);return (ssl->ctx);never executed: return (ssl->ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 3035 | } | - | ||||||||||||||||||||||||||||||||||||
| 3036 | - | |||||||||||||||||||||||||||||||||||||
| 3037 | SSL_CTX * | - | ||||||||||||||||||||||||||||||||||||
| 3038 | SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3039 | { | - | ||||||||||||||||||||||||||||||||||||
| 3040 | CERT *ocert = ssl->cert; | - | ||||||||||||||||||||||||||||||||||||
| 3041 | - | |||||||||||||||||||||||||||||||||||||
| 3042 | if (ssl->ctx == ctx
| 0 | ||||||||||||||||||||||||||||||||||||
| 3043 | return never executed: (ssl->ctx);return (ssl->ctx);never executed: return (ssl->ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 3044 | if (ctx ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 3045 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 3046 | ) | - | ||||||||||||||||||||||||||||||||||||
| 3047 | ctx = ssl->initial_ctx; never executed: ctx = ssl->initial_ctx; | 0 | ||||||||||||||||||||||||||||||||||||
| 3048 | ssl->cert = ssl_cert_dup(ctx->internal->cert); | - | ||||||||||||||||||||||||||||||||||||
| 3049 | if (ocert !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 3050 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 3051 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 3052 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 3053 | - | |||||||||||||||||||||||||||||||||||||
| 3054 | for (i = 0; i < 5
| 0 | ||||||||||||||||||||||||||||||||||||
| 3055 | ssl->cert->pkeys[i].digest = ocert->pkeys[i].digest; never executed: ssl->cert->pkeys[i].digest = ocert->pkeys[i].digest; | 0 | ||||||||||||||||||||||||||||||||||||
| 3056 | ssl_cert_free(ocert); | - | ||||||||||||||||||||||||||||||||||||
| 3057 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3058 | CRYPTO_add_lock(&ctx->references,1,12,__FILE__,2836); | - | ||||||||||||||||||||||||||||||||||||
| 3059 | SSL_CTX_free(ssl->ctx); | - | ||||||||||||||||||||||||||||||||||||
| 3060 | ssl->ctx = ctx; | - | ||||||||||||||||||||||||||||||||||||
| 3061 | return never executed: (ssl->ctx);return (ssl->ctx);never executed: return (ssl->ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 3062 | } | - | ||||||||||||||||||||||||||||||||||||
| 3063 | - | |||||||||||||||||||||||||||||||||||||
| 3064 | int | - | ||||||||||||||||||||||||||||||||||||
| 3065 | SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3066 | { | - | ||||||||||||||||||||||||||||||||||||
| 3067 | return executed 20 times by 1 test: (X509_STORE_set_default_paths(ctx->cert_store));return (X509_STORE_set_default_paths(ctx->cert_store));Executed by:
executed 20 times by 1 test: return (X509_STORE_set_default_paths(ctx->cert_store));Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 3068 | } | - | ||||||||||||||||||||||||||||||||||||
| 3069 | - | |||||||||||||||||||||||||||||||||||||
| 3070 | int | - | ||||||||||||||||||||||||||||||||||||
| 3071 | SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | - | ||||||||||||||||||||||||||||||||||||
| 3072 | const char *CApath) | - | ||||||||||||||||||||||||||||||||||||
| 3073 | { | - | ||||||||||||||||||||||||||||||||||||
| 3074 | return executed 60 times by 1 test: (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath));return (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath));Executed by:
executed 60 times by 1 test: return (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath));Executed by:
| 60 | ||||||||||||||||||||||||||||||||||||
| 3075 | } | - | ||||||||||||||||||||||||||||||||||||
| 3076 | - | |||||||||||||||||||||||||||||||||||||
| 3077 | int | - | ||||||||||||||||||||||||||||||||||||
| 3078 | SSL_CTX_load_verify_mem(SSL_CTX *ctx, void *buf, int len) | - | ||||||||||||||||||||||||||||||||||||
| 3079 | { | - | ||||||||||||||||||||||||||||||||||||
| 3080 | return executed 4 times by 1 test: (X509_STORE_load_mem(ctx->cert_store, buf, len));return (X509_STORE_load_mem(ctx->cert_store, buf, len));Executed by:
executed 4 times by 1 test: return (X509_STORE_load_mem(ctx->cert_store, buf, len));Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||
| 3081 | } | - | ||||||||||||||||||||||||||||||||||||
| 3082 | - | |||||||||||||||||||||||||||||||||||||
| 3083 | void | - | ||||||||||||||||||||||||||||||||||||
| 3084 | SSL_set_info_callback(SSL *ssl, void (*cb)(const SSL *ssl, int type, int val)) | - | ||||||||||||||||||||||||||||||||||||
| 3085 | { | - | ||||||||||||||||||||||||||||||||||||
| 3086 | ssl->internal->info_callback = cb; | - | ||||||||||||||||||||||||||||||||||||
| 3087 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3088 | - | |||||||||||||||||||||||||||||||||||||
| 3089 | void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl, int type, int val) | - | ||||||||||||||||||||||||||||||||||||
| 3090 | { | - | ||||||||||||||||||||||||||||||||||||
| 3091 | return never executed: (ssl->internal->info_callback);return (ssl->internal->info_callback);never executed: return (ssl->internal->info_callback); | 0 | ||||||||||||||||||||||||||||||||||||
| 3092 | } | - | ||||||||||||||||||||||||||||||||||||
| 3093 | - | |||||||||||||||||||||||||||||||||||||
| 3094 | int | - | ||||||||||||||||||||||||||||||||||||
| 3095 | SSL_state(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 3096 | { | - | ||||||||||||||||||||||||||||||||||||
| 3097 | return executed 10305 times by 5 tests: ((ssl->s3->internal)->hs.state);return ((ssl->s3->internal)->hs.state);Executed by:
executed 10305 times by 5 tests: return ((ssl->s3->internal)->hs.state);Executed by:
| 10305 | ||||||||||||||||||||||||||||||||||||
| 3098 | } | - | ||||||||||||||||||||||||||||||||||||
| 3099 | - | |||||||||||||||||||||||||||||||||||||
| 3100 | void | - | ||||||||||||||||||||||||||||||||||||
| 3101 | SSL_set_state(SSL *ssl, int state) | - | ||||||||||||||||||||||||||||||||||||
| 3102 | { | - | ||||||||||||||||||||||||||||||||||||
| 3103 | (ssl->s3->internal)->hs.state = state; | - | ||||||||||||||||||||||||||||||||||||
| 3104 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3105 | - | |||||||||||||||||||||||||||||||||||||
| 3106 | void | - | ||||||||||||||||||||||||||||||||||||
| 3107 | SSL_set_verify_result(SSL *ssl, long arg) | - | ||||||||||||||||||||||||||||||||||||
| 3108 | { | - | ||||||||||||||||||||||||||||||||||||
| 3109 | ssl->verify_result = arg; | - | ||||||||||||||||||||||||||||||||||||
| 3110 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3111 | - | |||||||||||||||||||||||||||||||||||||
| 3112 | long | - | ||||||||||||||||||||||||||||||||||||
| 3113 | SSL_get_verify_result(const SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 3114 | { | - | ||||||||||||||||||||||||||||||||||||
| 3115 | return never executed: (ssl->verify_result);return (ssl->verify_result);never executed: return (ssl->verify_result); | 0 | ||||||||||||||||||||||||||||||||||||
| 3116 | } | - | ||||||||||||||||||||||||||||||||||||
| 3117 | - | |||||||||||||||||||||||||||||||||||||
| 3118 | int | - | ||||||||||||||||||||||||||||||||||||
| 3119 | SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | - | ||||||||||||||||||||||||||||||||||||
| 3120 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | - | ||||||||||||||||||||||||||||||||||||
| 3121 | { | - | ||||||||||||||||||||||||||||||||||||
| 3122 | return never executed: (CRYPTO_get_ex_new_index(1, argl, argp,return (CRYPTO_get_ex_new_index(1, argl, argp, new_func, dup_func, free_func));never executed: return (CRYPTO_get_ex_new_index(1, argl, argp, new_func, dup_func, free_func)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3123 | new_func, dup_func, free_func)); never executed: return (CRYPTO_get_ex_new_index(1, argl, argp, new_func, dup_func, free_func)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3124 | } | - | ||||||||||||||||||||||||||||||||||||
| 3125 | - | |||||||||||||||||||||||||||||||||||||
| 3126 | int | - | ||||||||||||||||||||||||||||||||||||
| 3127 | SSL_set_ex_data(SSL *s, int idx, void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 3128 | { | - | ||||||||||||||||||||||||||||||||||||
| 3129 | return executed 8 times by 1 test: (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));Executed by:
executed 8 times by 1 test: return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||
| 3130 | } | - | ||||||||||||||||||||||||||||||||||||
| 3131 | - | |||||||||||||||||||||||||||||||||||||
| 3132 | void * | - | ||||||||||||||||||||||||||||||||||||
| 3133 | SSL_get_ex_data(const SSL *s, int idx) | - | ||||||||||||||||||||||||||||||||||||
| 3134 | { | - | ||||||||||||||||||||||||||||||||||||
| 3135 | return executed 12 times by 1 test: (CRYPTO_get_ex_data(&s->internal->ex_data, idx));return (CRYPTO_get_ex_data(&s->internal->ex_data, idx));Executed by:
executed 12 times by 1 test: return (CRYPTO_get_ex_data(&s->internal->ex_data, idx));Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||
| 3136 | } | - | ||||||||||||||||||||||||||||||||||||
| 3137 | - | |||||||||||||||||||||||||||||||||||||
| 3138 | int | - | ||||||||||||||||||||||||||||||||||||
| 3139 | SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | - | ||||||||||||||||||||||||||||||||||||
| 3140 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | - | ||||||||||||||||||||||||||||||||||||
| 3141 | { | - | ||||||||||||||||||||||||||||||||||||
| 3142 | return never executed: (CRYPTO_get_ex_new_index(2, argl, argp,return (CRYPTO_get_ex_new_index(2, argl, argp, new_func, dup_func, free_func));never executed: return (CRYPTO_get_ex_new_index(2, argl, argp, new_func, dup_func, free_func)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3143 | new_func, dup_func, free_func)); never executed: return (CRYPTO_get_ex_new_index(2, argl, argp, new_func, dup_func, free_func)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3144 | } | - | ||||||||||||||||||||||||||||||||||||
| 3145 | - | |||||||||||||||||||||||||||||||||||||
| 3146 | int | - | ||||||||||||||||||||||||||||||||||||
| 3147 | SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) | - | ||||||||||||||||||||||||||||||||||||
| 3148 | { | - | ||||||||||||||||||||||||||||||||||||
| 3149 | return never executed: (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));never executed: return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3150 | } | - | ||||||||||||||||||||||||||||||||||||
| 3151 | - | |||||||||||||||||||||||||||||||||||||
| 3152 | void * | - | ||||||||||||||||||||||||||||||||||||
| 3153 | SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) | - | ||||||||||||||||||||||||||||||||||||
| 3154 | { | - | ||||||||||||||||||||||||||||||||||||
| 3155 | return never executed: (CRYPTO_get_ex_data(&s->internal->ex_data, idx));return (CRYPTO_get_ex_data(&s->internal->ex_data, idx));never executed: return (CRYPTO_get_ex_data(&s->internal->ex_data, idx)); | 0 | ||||||||||||||||||||||||||||||||||||
| 3156 | } | - | ||||||||||||||||||||||||||||||||||||
| 3157 | - | |||||||||||||||||||||||||||||||||||||
| 3158 | int | - | ||||||||||||||||||||||||||||||||||||
| 3159 | ssl_ok(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3160 | { | - | ||||||||||||||||||||||||||||||||||||
| 3161 | return never executed: (1);return (1);never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||
| 3162 | } | - | ||||||||||||||||||||||||||||||||||||
| 3163 | - | |||||||||||||||||||||||||||||||||||||
| 3164 | X509_STORE * | - | ||||||||||||||||||||||||||||||||||||
| 3165 | SSL_CTX_get_cert_store(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3166 | { | - | ||||||||||||||||||||||||||||||||||||
| 3167 | return never executed: (ctx->cert_store);return (ctx->cert_store);never executed: return (ctx->cert_store); | 0 | ||||||||||||||||||||||||||||||||||||
| 3168 | } | - | ||||||||||||||||||||||||||||||||||||
| 3169 | - | |||||||||||||||||||||||||||||||||||||
| 3170 | void | - | ||||||||||||||||||||||||||||||||||||
| 3171 | SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) | - | ||||||||||||||||||||||||||||||||||||
| 3172 | { | - | ||||||||||||||||||||||||||||||||||||
| 3173 | X509_STORE_free(ctx->cert_store); | - | ||||||||||||||||||||||||||||||||||||
| 3174 | ctx->cert_store = store; | - | ||||||||||||||||||||||||||||||||||||
| 3175 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3176 | - | |||||||||||||||||||||||||||||||||||||
| 3177 | X509 * | - | ||||||||||||||||||||||||||||||||||||
| 3178 | SSL_CTX_get0_certificate(const SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3179 | { | - | ||||||||||||||||||||||||||||||||||||
| 3180 | if (ctx->internal->cert ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 3181 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 3182 | ) | - | ||||||||||||||||||||||||||||||||||||
| 3183 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 3184 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 3185 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 3186 | - | |||||||||||||||||||||||||||||||||||||
| 3187 | return never executed: ctx->internal->cert->key->x509;return ctx->internal->cert->key->x509;never executed: return ctx->internal->cert->key->x509; | 0 | ||||||||||||||||||||||||||||||||||||
| 3188 | } | - | ||||||||||||||||||||||||||||||||||||
| 3189 | - | |||||||||||||||||||||||||||||||||||||
| 3190 | int | - | ||||||||||||||||||||||||||||||||||||
| 3191 | SSL_want(const SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3192 | { | - | ||||||||||||||||||||||||||||||||||||
| 3193 | return executed 3470 times by 2 tests: (s->internal->rwstate);return (s->internal->rwstate);Executed by:
executed 3470 times by 2 tests: return (s->internal->rwstate);Executed by:
| 3470 | ||||||||||||||||||||||||||||||||||||
| 3194 | } | - | ||||||||||||||||||||||||||||||||||||
| 3195 | - | |||||||||||||||||||||||||||||||||||||
| 3196 | void | - | ||||||||||||||||||||||||||||||||||||
| 3197 | SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
| 3198 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3199 | { | - | ||||||||||||||||||||||||||||||||||||
| 3200 | SSL_CTX_callback_ctrl(ctx, 5,(void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
| 3201 | } executed 50 times by 1 test: end of blockExecuted by:
| 50 | ||||||||||||||||||||||||||||||||||||
| 3202 | - | |||||||||||||||||||||||||||||||||||||
| 3203 | void | - | ||||||||||||||||||||||||||||||||||||
| 3204 | SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
| 3205 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3206 | { | - | ||||||||||||||||||||||||||||||||||||
| 3207 | SSL_callback_ctrl(ssl, 5,(void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
| 3208 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3209 | - | |||||||||||||||||||||||||||||||||||||
| 3210 | void | - | ||||||||||||||||||||||||||||||||||||
| 3211 | SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh)(SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
| 3212 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3213 | { | - | ||||||||||||||||||||||||||||||||||||
| 3214 | SSL_CTX_callback_ctrl(ctx, 6,(void (*)(void))dh); | - | ||||||||||||||||||||||||||||||||||||
| 3215 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3216 | - | |||||||||||||||||||||||||||||||||||||
| 3217 | void | - | ||||||||||||||||||||||||||||||||||||
| 3218 | SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh)(SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
| 3219 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3220 | { | - | ||||||||||||||||||||||||||||||||||||
| 3221 | SSL_callback_ctrl(ssl, 6,(void (*)(void))dh); | - | ||||||||||||||||||||||||||||||||||||
| 3222 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3223 | - | |||||||||||||||||||||||||||||||||||||
| 3224 | void | - | ||||||||||||||||||||||||||||||||||||
| 3225 | SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, EC_KEY *(*ecdh)(SSL *ssl, | - | ||||||||||||||||||||||||||||||||||||
| 3226 | int is_export, int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3227 | { | - | ||||||||||||||||||||||||||||||||||||
| 3228 | SSL_CTX_callback_ctrl(ctx, 7, | - | ||||||||||||||||||||||||||||||||||||
| 3229 | (void (*)(void))ecdh); | - | ||||||||||||||||||||||||||||||||||||
| 3230 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3231 | - | |||||||||||||||||||||||||||||||||||||
| 3232 | void | - | ||||||||||||||||||||||||||||||||||||
| 3233 | SSL_set_tmp_ecdh_callback(SSL *ssl, EC_KEY *(*ecdh)(SSL *ssl, int is_export, | - | ||||||||||||||||||||||||||||||||||||
| 3234 | int keylength)) | - | ||||||||||||||||||||||||||||||||||||
| 3235 | { | - | ||||||||||||||||||||||||||||||||||||
| 3236 | SSL_callback_ctrl(ssl, 7,(void (*)(void))ecdh); | - | ||||||||||||||||||||||||||||||||||||
| 3237 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3238 | - | |||||||||||||||||||||||||||||||||||||
| 3239 | - | |||||||||||||||||||||||||||||||||||||
| 3240 | void | - | ||||||||||||||||||||||||||||||||||||
| 3241 | SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
| 3242 | int content_type, const void *buf, size_t len, SSL *ssl, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
| 3243 | { | - | ||||||||||||||||||||||||||||||||||||
| 3244 | SSL_CTX_callback_ctrl(ctx, 15, | - | ||||||||||||||||||||||||||||||||||||
| 3245 | (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
| 3246 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3247 | - | |||||||||||||||||||||||||||||||||||||
| 3248 | void | - | ||||||||||||||||||||||||||||||||||||
| 3249 | SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | - | ||||||||||||||||||||||||||||||||||||
| 3250 | int content_type, const void *buf, size_t len, SSL *ssl, void *arg)) | - | ||||||||||||||||||||||||||||||||||||
| 3251 | { | - | ||||||||||||||||||||||||||||||||||||
| 3252 | SSL_callback_ctrl(ssl, 15, (void (*)(void))cb); | - | ||||||||||||||||||||||||||||||||||||
| 3253 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3254 | - | |||||||||||||||||||||||||||||||||||||
| 3255 | void | - | ||||||||||||||||||||||||||||||||||||
| 3256 | SSL_set_debug(SSL *s, int debug) | - | ||||||||||||||||||||||||||||||||||||
| 3257 | { | - | ||||||||||||||||||||||||||||||||||||
| 3258 | s->internal->debug = debug; | - | ||||||||||||||||||||||||||||||||||||
| 3259 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 3260 | - | |||||||||||||||||||||||||||||||||||||
| 3261 | int | - | ||||||||||||||||||||||||||||||||||||
| 3262 | SSL_cache_hit(SSL *s) | - | ||||||||||||||||||||||||||||||||||||
| 3263 | { | - | ||||||||||||||||||||||||||||||||||||
| 3264 | return never executed: (s->internal->hit);return (s->internal->hit);never executed: return (s->internal->hit); | 0 | ||||||||||||||||||||||||||||||||||||
| 3265 | } | - | ||||||||||||||||||||||||||||||||||||
| 3266 | - | |||||||||||||||||||||||||||||||||||||
| 3267 | int | - | ||||||||||||||||||||||||||||||||||||
| 3268 | SSL_CTX_get_min_proto_version(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3269 | { | - | ||||||||||||||||||||||||||||||||||||
| 3270 | return executed 15 times by 1 test: ctx->internal->min_version;return ctx->internal->min_version;Executed by:
executed 15 times by 1 test: return ctx->internal->min_version;Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3271 | } | - | ||||||||||||||||||||||||||||||||||||
| 3272 | - | |||||||||||||||||||||||||||||||||||||
| 3273 | int | - | ||||||||||||||||||||||||||||||||||||
| 3274 | SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) | - | ||||||||||||||||||||||||||||||||||||
| 3275 | { | - | ||||||||||||||||||||||||||||||||||||
| 3276 | return executed 20 times by 1 test: ssl_version_set_min(ctx->method, version,return ssl_version_set_min(ctx->method, version, ctx->internal->max_version, &ctx->internal->min_version);Executed by:
executed 20 times by 1 test: return ssl_version_set_min(ctx->method, version, ctx->internal->max_version, &ctx->internal->min_version);Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 3277 | ctx->internal->max_version, &ctx->internal->min_version); executed 20 times by 1 test: return ssl_version_set_min(ctx->method, version, ctx->internal->max_version, &ctx->internal->min_version);Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||
| 3278 | } | - | ||||||||||||||||||||||||||||||||||||
| 3279 | - | |||||||||||||||||||||||||||||||||||||
| 3280 | int | - | ||||||||||||||||||||||||||||||||||||
| 3281 | SSL_CTX_get_max_proto_version(SSL_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 3282 | { | - | ||||||||||||||||||||||||||||||||||||
| 3283 | return executed 15 times by 1 test: ctx->internal->max_version;return ctx->internal->max_version;Executed by:
executed 15 times by 1 test: return ctx->internal->max_version;Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3284 | } | - | ||||||||||||||||||||||||||||||||||||
| 3285 | - | |||||||||||||||||||||||||||||||||||||
| 3286 | int | - | ||||||||||||||||||||||||||||||||||||
| 3287 | SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) | - | ||||||||||||||||||||||||||||||||||||
| 3288 | { | - | ||||||||||||||||||||||||||||||||||||
| 3289 | return executed 18 times by 1 test: ssl_version_set_max(ctx->method, version,return ssl_version_set_max(ctx->method, version, ctx->internal->min_version, &ctx->internal->max_version);Executed by:
executed 18 times by 1 test: return ssl_version_set_max(ctx->method, version, ctx->internal->min_version, &ctx->internal->max_version);Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 3290 | ctx->internal->min_version, &ctx->internal->max_version); executed 18 times by 1 test: return ssl_version_set_max(ctx->method, version, ctx->internal->min_version, &ctx->internal->max_version);Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 3291 | } | - | ||||||||||||||||||||||||||||||||||||
| 3292 | - | |||||||||||||||||||||||||||||||||||||
| 3293 | int | - | ||||||||||||||||||||||||||||||||||||
| 3294 | SSL_get_min_proto_version(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 3295 | { | - | ||||||||||||||||||||||||||||||||||||
| 3296 | return executed 30 times by 1 test: ssl->internal->min_version;return ssl->internal->min_version;Executed by:
executed 30 times by 1 test: return ssl->internal->min_version;Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||
| 3297 | } | - | ||||||||||||||||||||||||||||||||||||
| 3298 | - | |||||||||||||||||||||||||||||||||||||
| 3299 | int | - | ||||||||||||||||||||||||||||||||||||
| 3300 | SSL_set_min_proto_version(SSL *ssl, uint16_t version) | - | ||||||||||||||||||||||||||||||||||||
| 3301 | { | - | ||||||||||||||||||||||||||||||||||||
| 3302 | return executed 15 times by 1 test: ssl_version_set_min(ssl->method, version,return ssl_version_set_min(ssl->method, version, ssl->internal->max_version, &ssl->internal->min_version);Executed by:
executed 15 times by 1 test: return ssl_version_set_min(ssl->method, version, ssl->internal->max_version, &ssl->internal->min_version);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3303 | ssl->internal->max_version, &ssl->internal->min_version); executed 15 times by 1 test: return ssl_version_set_min(ssl->method, version, ssl->internal->max_version, &ssl->internal->min_version);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3304 | } | - | ||||||||||||||||||||||||||||||||||||
| 3305 | int | - | ||||||||||||||||||||||||||||||||||||
| 3306 | SSL_get_max_proto_version(SSL *ssl) | - | ||||||||||||||||||||||||||||||||||||
| 3307 | { | - | ||||||||||||||||||||||||||||||||||||
| 3308 | return executed 30 times by 1 test: ssl->internal->max_version;return ssl->internal->max_version;Executed by:
executed 30 times by 1 test: return ssl->internal->max_version;Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||
| 3309 | } | - | ||||||||||||||||||||||||||||||||||||
| 3310 | - | |||||||||||||||||||||||||||||||||||||
| 3311 | int | - | ||||||||||||||||||||||||||||||||||||
| 3312 | SSL_set_max_proto_version(SSL *ssl, uint16_t version) | - | ||||||||||||||||||||||||||||||||||||
| 3313 | { | - | ||||||||||||||||||||||||||||||||||||
| 3314 | return executed 15 times by 1 test: ssl_version_set_max(ssl->method, version,return ssl_version_set_max(ssl->method, version, ssl->internal->min_version, &ssl->internal->max_version);Executed by:
executed 15 times by 1 test: return ssl_version_set_max(ssl->method, version, ssl->internal->min_version, &ssl->internal->max_version);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3315 | ssl->internal->min_version, &ssl->internal->max_version); executed 15 times by 1 test: return ssl_version_set_max(ssl->method, version, ssl->internal->min_version, &ssl->internal->max_version);Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||
| 3316 | } | - | ||||||||||||||||||||||||||||||||||||
| 3317 | - | |||||||||||||||||||||||||||||||||||||
| 3318 | static int | - | ||||||||||||||||||||||||||||||||||||
| 3319 | ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | - | ||||||||||||||||||||||||||||||||||||
| 3320 | { | - | ||||||||||||||||||||||||||||||||||||
| 3321 | SSL_CIPHER const *a = a_; | - | ||||||||||||||||||||||||||||||||||||
| 3322 | SSL_CIPHER const *b = b_; | - | ||||||||||||||||||||||||||||||||||||
| 3323 | return executed 9335 times by 7 tests: ssl_cipher_id_cmp(a, b);return ssl_cipher_id_cmp(a, b);Executed by:
executed 9335 times by 7 tests: return ssl_cipher_id_cmp(a, b);Executed by:
| 9335 | ||||||||||||||||||||||||||||||||||||
| 3324 | } | - | ||||||||||||||||||||||||||||||||||||
| 3325 | - | |||||||||||||||||||||||||||||||||||||
| 3326 | SSL_CIPHER * | - | ||||||||||||||||||||||||||||||||||||
| 3327 | OBJ_bsearch_ssl_cipher_id(SSL_CIPHER *key, SSL_CIPHER const *base, int num) | - | ||||||||||||||||||||||||||||||||||||
| 3328 | { | - | ||||||||||||||||||||||||||||||||||||
| 3329 | return executed 1778 times by 7 tests: (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER),return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN);Executed by:
executed 1778 times by 7 tests: return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN);Executed by:
| 1778 | ||||||||||||||||||||||||||||||||||||
| 3330 | ssl_cipher_id_cmp_BSEARCH_CMP_FN); executed 1778 times by 7 tests: return (SSL_CIPHER *)OBJ_bsearch_(key, base, num, sizeof(SSL_CIPHER), ssl_cipher_id_cmp_BSEARCH_CMP_FN);Executed by:
| 1778 | ||||||||||||||||||||||||||||||||||||
| 3331 | } | - | ||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |