Branch Coverage

src/ssl/ssl_hs_client.c
Criterion Covered Total %
branch 52 142 36.6


line true false branch
23 9095 0 if (y < 0x80) {
42 12758 228 if (y < 0x80) {
43 1654 11104 if (neg) {
120 0 0 while (nlen > 0 && *n == 0) {
0 0 while (nlen > 0 && *n == 0) {
132 0 0 if (nlen < 59) {
135 0 0 if (nlen > sizeof ctx->eng.pad) {
154 0 0 for (u = 2; u < nlen - 49; u ++) {
155 0 0 while (ctx->eng.pad[u] == 0) {
164 0 0 if (!ctx->irsapub(ctx->eng.pad, nlen, &pk->key.rsa)) {
216 1 0 if (hash) {
218 0 1 if (hv_len == 0) {
222 0 0 if (!br_multihash_out(&mhc, br_md5_ID, hv)
223 0 0 || !br_multihash_out(&mhc, br_sha1_ID, hv + 16))
229 1 0 if (use_rsa) {
233 1 0 if (hash) {
238 1 0 if (!ctx->eng.irsavrfy(ctx->eng.pad, sig_len,
240 0 1 || memcmp(tmp, hv, hv_len) != 0)
245 0 0 if (!ctx->eng.iecdsa(ctx->eng.iec, hv, hv_len, &pk->key.ec,
272 1 0 if (ecdhe) {
286 0 1 if ((ctx->eng.iec->supported_curves & ((uint32_t)1 << curve)) == 0) {
298 2 1 while (mask >= order[0]) {
310 0 1 if (glen != point_len) {
315 0 1 if (!ctx->eng.iec->mul(point, glen, key, olen, curve)) {
351 0 0 if (point_len > sizeof point) {
355 0 0 if (!(*ctx->client_auth_vtable)->do_keyx(
382 0 0 if (ctx->hash_id) {
962 44796 7174 if (t0x < T0_INTERPRETED) {
970 0 7172 if (t0x == 0) {
991 1582 62 if (T0_POP()) {
997 1682 509 if (!T0_POP()) {
1106 0 0 if (CTX->client_auth_vtable != NULL) {
1116 0 0 if (CTX->client_auth_vtable != NULL) {
1126 0 0 if (CTX->client_auth_vtable != NULL) {
1139 0 0 if (CTX->client_auth_vtable != NULL) {
1149 0 0 if (CTX->client_auth_vtable != NULL) {
1168 0 0 if (ENG->chain_len == 0) {
1211 2 0 if (ENG->session.version >= BR_TLS12) {
1218 1 1 prf(ENG->pad, 12, ENG->session.master_secret,
1231 0 0 if (clen > sizeof ENG->pad) {
1272 0 0 if (sig_len == 0) {
1288 0 1 if (x < 0) {
1303 0 0 if (x < 0) {
1317 0 0 if (make_pms_static_ecdh(CTX, prf_id) < 0) {
1339 3 0 if (ENG->protocol_names_num == 0) {
1344 0 0 for (u = 0; u < ENG->protocol_names_num; u ++) {
1372 0 0 if (CTX->client_auth_vtable != NULL) {
1397 0 1 if (pk == NULL) {
1469 2 0 T0_PUSHi(ENG->hlen_in != 0 || !br_ssl_engine_recvrec_finished(ENG));
0 2 T0_PUSHi(ENG->hlen_in != 0 || !br_ssl_engine_recvrec_finished(ENG));
1514 9 0 if (clen > 0) {
1519 8 1 if ((size_t)len < clen) {
1523 9 0 if (ENG->record_type_in == BR_SSL_HANDSHAKE) {
1537 50 4 if (ENG->hlen_in > 0) {
1541 47 3 if (ENG->record_type_in == BR_SSL_HANDSHAKE) {
1561 0 1 (pk->key_type == BR_KEYTYPE_EC) ? pk->key.ec.curve : 0;
1600 8 0 uint32_t x = ENG->iec == NULL ? 0 : ENG->iec->supported_curves;
1613 30 6 for (i = br_sha1_ID; i <= br_sha512_ID; i ++) {
1614 30 0 if (br_multihash_getimpl(&ENG->mhash, i)) {
1712 0 0 br_ssl_engine_switch_cbc_in(ENG, is_client, prf_id, mac_id,
1728 0 0 br_ssl_engine_switch_cbc_out(ENG, is_client, prf_id, mac_id,
1761 0 0 for (u = 0; u < ENG->protocol_names_num; u ++) {
1765 0 0 if (len == strlen(name) && memcmp(ENG->pad, name, len) == 0) {
0 0 if (len == strlen(name) && memcmp(ENG->pad, name, len) == 0) {
1781 0 0 for (u = 0; u < ENG->chain_len; u ++) {
1812 6 0 if (clen > 0) {
1817 6 0 if ((size_t)len < clen) {
1821 6 0 if (ENG->record_type_out == BR_SSL_HANDSHAKE) {
1838 175 0 if (ENG->hlen_out > 0) {
1839 172 3 if (ENG->record_type_out == BR_SSL_HANDSHAKE) {
1901 1 0 xc->start_chain(ENG->x509ctx, bc ? ENG->server_name : NULL);