| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/d1_msg.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, size_t len, | - | ||||||||||||
| 3 | size_t *written) | - | ||||||||||||
| 4 | { | - | ||||||||||||
| 5 | int i; | - | ||||||||||||
| 6 | - | |||||||||||||
| 7 | if (SSL_in_init(s)
| 0-1077 | ||||||||||||
| 8 | i = s->handshake_func(s); | - | ||||||||||||
| 9 | if (i < 0
| 0 | ||||||||||||
| 10 | return never executed: i;return i;never executed: return i; | 0 | ||||||||||||
| 11 | if (i == 0
| 0 | ||||||||||||
| 12 | ERR_put_error(20,(268),(229),__FILE__,23) | - | ||||||||||||
| 13 | ; | - | ||||||||||||
| 14 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||
| 15 | } | - | ||||||||||||
| 16 | } never executed: end of block | 0 | ||||||||||||
| 17 | - | |||||||||||||
| 18 | if (len > 16384
| 0-1077 | ||||||||||||
| 19 | ERR_put_error(20,(268),(334),__FILE__,29); | - | ||||||||||||
| 20 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||
| 21 | } | - | ||||||||||||
| 22 | - | |||||||||||||
| 23 | return executed 1077 times by 1 test: dtls1_write_bytes(s, type, buf_, len, written);return dtls1_write_bytes(s, type, buf_, len, written);Executed by:
executed 1077 times by 1 test: return dtls1_write_bytes(s, type, buf_, len, written);Executed by:
| 1077 | ||||||||||||
| 24 | } | - | ||||||||||||
| 25 | - | |||||||||||||
| 26 | int dtls1_dispatch_alert(SSL *s) | - | ||||||||||||
| 27 | { | - | ||||||||||||
| 28 | int i, j; | - | ||||||||||||
| 29 | void (*cb) (const SSL *ssl, int type, int val) = | - | ||||||||||||
| 30 | ((void *)0) | - | ||||||||||||
| 31 | ; | - | ||||||||||||
| 32 | unsigned char buf[2]; | - | ||||||||||||
| 33 | unsigned char *ptr = &buf[0]; | - | ||||||||||||
| 34 | size_t written; | - | ||||||||||||
| 35 | - | |||||||||||||
| 36 | s->s3->alert_dispatch = 0; | - | ||||||||||||
| 37 | - | |||||||||||||
| 38 | memset(buf, 0, sizeof(buf)); | - | ||||||||||||
| 39 | *ptr++ = s->s3->send_alert[0]; | - | ||||||||||||
| 40 | *ptr++ = s->s3->send_alert[1]; | - | ||||||||||||
| 41 | - | |||||||||||||
| 42 | i = do_dtls1_write(s, 21, &buf[0], sizeof(buf), 0, &written); | - | ||||||||||||
| 43 | if (i <= 0
| 0-239 | ||||||||||||
| 44 | s->s3->alert_dispatch = 1; | - | ||||||||||||
| 45 | - | |||||||||||||
| 46 | } never executed: else {end of block | 0 | ||||||||||||
| 47 | if (s->s3->send_alert[0] == 2
| 13-226 | ||||||||||||
| 48 | ( executed 13 times by 1 test: void)(int)BIO_ctrl(s->wbio,11,0,(void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );Executed by:
executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );Executed by:
| 13 | ||||||||||||
| 49 | ((void *)0) executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );Executed by:
| 13 | ||||||||||||
| 50 | ); executed 13 times by 1 test: (void)(int)BIO_ctrl(s->wbio,11,0, ((void *)0) );Executed by:
| 13 | ||||||||||||
| 51 | - | |||||||||||||
| 52 | if (s->msg_callback
| 0-239 | ||||||||||||
| 53 | s->msg_callback(1, s->version, 21, s->s3->send_alert, never executed: s->msg_callback(1, s->version, 21, s->s3->send_alert, 2, s, s->msg_callback_arg); | 0 | ||||||||||||
| 54 | 2, s, s->msg_callback_arg); never executed: s->msg_callback(1, s->version, 21, s->s3->send_alert, 2, s, s->msg_callback_arg); | 0 | ||||||||||||
| 55 | - | |||||||||||||
| 56 | if (s->info_callback !=
| 14-225 | ||||||||||||
| 57 | ((void *)0)
| 14-225 | ||||||||||||
| 58 | ) | - | ||||||||||||
| 59 | cb = s->info_callback; executed 225 times by 1 test: cb = s->info_callback;Executed by:
| 225 | ||||||||||||
| 60 | else if (s->ctx->info_callback !=
| 0-14 | ||||||||||||
| 61 | ((void *)0)
| 0-14 | ||||||||||||
| 62 | ) | - | ||||||||||||
| 63 | cb = s->ctx->info_callback; never executed: cb = s->ctx->info_callback; | 0 | ||||||||||||
| 64 | - | |||||||||||||
| 65 | if (cb !=
| 14-225 | ||||||||||||
| 66 | ((void *)0)
| 14-225 | ||||||||||||
| 67 | ) { | - | ||||||||||||
| 68 | j = (s->s3->send_alert[0] << 8) | s->s3->send_alert[1]; | - | ||||||||||||
| 69 | cb(s, (0x4000|0x08), j); | - | ||||||||||||
| 70 | } executed 225 times by 1 test: end of blockExecuted by:
| 225 | ||||||||||||
| 71 | } executed 239 times by 1 test: end of blockExecuted by:
| 239 | ||||||||||||
| 72 | return executed 239 times by 1 test: i;return i;Executed by:
executed 239 times by 1 test: return i;Executed by:
| 239 | ||||||||||||
| 73 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |