Branch Coverage

inc/matrixssl-3-9-3-open/matrixssl/tls.c
Criterion Covered Total %
branch 35 116 30.1


line true false branch
96 0 2119 if (reqKeyLen > SSL_MAX_KEY_BLOCK_SIZE)
103 2119 0 if (ssl->flags & SSL_FLAGS_TLS_1_2)
105 0 2119 if ((rc = prf2(ssl->sec.masterSecret, SSL_HS_MASTER_SIZE, msSeed,
115 0 0 if ((rc = prf(ssl->sec.masterSecret, SSL_HS_MASTER_SIZE, msSeed,
131 1059 1060 if (ssl->flags & SSL_FLAGS_SERVER)
166 0 2119 if (rc < 0)
194 4 0 if (ssl->flags & SSL_FLAGS_RESUMED)
217 0 0 if (ssl->flags & SSL_FLAGS_TLS_1_2)
219 0 0 if ((rc = prf2(ssl->sec.premaster, ssl->sec.premasterSize, msSeed,
229 0 0 if ((rc = prf(ssl->sec.premaster, ssl->sec.premasterSize, msSeed,
286 2115 0 if (ssl->extFlags.extended_master_secret == 0 ||
0 2115 if (ssl->extFlags.extended_master_secret == 0 ||
309 2115 0 if (ssl->flags & SSL_FLAGS_TLS_1_2)
311 0 2115 if ((rc = prf2(ssl->sec.premaster, ssl->sec.premasterSize, msSeed,
321 0 0 if ((rc = prf(ssl->sec.premaster, ssl->sec.premasterSize, msSeed,
383 3 3 if (mode == HMAC_CREATE)
395 0 6 if (key == NULL)
435 0 6 if (psHmacSha1Init(&ctx, key, SHA1_HASH_SIZE) < 0)
445 6 0 for (i = 7; i >= 0; i--)
448 6 0 if (seq[i] != 0)
481 0 0 if (mode == HMAC_CREATE)
492 0 0 if (key == NULL)
536 0 0 if (psHmacInit(&ctx, HMAC_SHA256, key, hashLen) < 0)
542 0 0 if (psHmacInit(&ctx, HMAC_SHA384, key, hashLen) < 0)
556 0 0 for (i = 7; i >= 0; i--)
559 0 0 if (seq[i] != 0)
654 4 0 if (ssl->flags & SSL_FLAGS_TLS)
686 0 24433 if (ssl->extFlags.truncated_hmac)
688 0 0 if (ssl->cipher->macSize > 0) /* Only for HMAC-based ciphers */
708 2119 22314 if (ssl->cipher->ident != SSL_NULL_WITH_NULL_NULL)
711 0 2119 if (ssl->sec.rMACptr == NULL)
719 2117 2 if (ssl->deMacSize == 0)
725 0 2117 if (ssl->cipher->flags & CRYPTO_FLAGS_CHACHA)
749 2119 0 if (ssl->cipher->init)
751 0 2119 if (ssl->cipher->init(&(ssl->sec), INIT_DECRYPT_CIPHER,
787 0 24433 if (ssl->extFlags.truncated_hmac)
789 0 0 if (ssl->cipher->macSize > 0) /* Only for HMAC-based ciphers */
808 2119 22314 if (ssl->cipher->ident != SSL_NULL_WITH_NULL_NULL)
813 2117 2 if (ssl->enMacSize == 0)
819 0 2117 if (ssl->cipher->flags & CRYPTO_FLAGS_CHACHA)
844 2119 0 if (ssl->cipher->init)
846 0 2119 if (ssl->cipher->init(&(ssl->sec), INIT_ENCRYPT_CIPHER,
872 0 0 if (ext == NULL)
891 0 0 if (extension == NULL)
897 0 0 if (ext->extData)
904 0 0 while (next)
908 0 0 if (ext->extData)
927 0 0 if (ext == NULL || (length > 0 && extension == NULL))
0 0 if (ext == NULL || (length > 0 && extension == NULL))
0 0 if (ext == NULL || (length > 0 && extension == NULL))
936 0 0 while (current->extLen != 0)
938 0 0 if (current->next != NULL)
944 0 0 if (new == NULL)
962 0 0 if (length > 0)
965 0 0 if (length == 1 && extension[0] == '\0')
0 0 if (length == 1 && extension[0] == '\0')
972 0 0 if (current->extData == NULL)
979 0 0 else if (length == 0)