LLVMFuzzerTestOneInput:
  168|  1.37k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  169|  1.37k|  FuzzedDataProvider fdp(data, size);
  170|       |
  171|  3.98k|  for (unsigned i = 0; i < fdp.ConsumeIntegralInRange<unsigned>(1, 4); i++) {
  ------------------
  |  Branch (171:24): [True: 2.60k, False: 1.37k]
  ------------------
  172|  2.60k|    if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (172:9): [True: 1.35k, False: 1.24k]
  ------------------
  173|  1.35k|      fuzz_hash_ext_multi<struct mhd_Md5CtxExt>(
  174|  1.35k|        fdp, 64,
  175|  1.35k|        mhd_MD5_init_one_time, mhd_MD5_update, mhd_MD5_finish_reset, mhd_MD5_deinit,
  176|  1.35k|        mhd_MD5_DIGEST_SIZE);
  ------------------
  |  |   54|  1.35k|#define mhd_MD5_DIGEST_SIZE (16)
  ------------------
  177|  1.35k|    } else {
  178|  1.24k|      fuzz_hash_ext_multi<struct mhd_Sha256CtxExt>(
  179|  1.24k|        fdp, 64,
  180|  1.24k|        mhd_SHA256_init_one_time, mhd_SHA256_update, mhd_SHA256_finish_reset, mhd_SHA256_deinit,
  181|  1.24k|        mhd_SHA256_DIGEST_SIZE);
  ------------------
  |  |   56|  1.24k|#  define mhd_SHA256_DIGEST_SIZE (32)
  ------------------
  182|  1.24k|    }
  183|  2.60k|  }
  184|  1.37k|  return 0;
  185|  1.37k|}
fuzz_crypto_ext.cpp:_ZL19fuzz_hash_ext_multiI13mhd_Md5CtxExtEvR18FuzzedDataProvidermPFvPT_EPFvS4_mPKhEPFvS4_PhES6_m:
   42|  1.35k|                                size_t digest_size) {
   43|  1.35k|  if (!fdp.remaining_bytes()) {
  ------------------
  |  Branch (43:7): [True: 6, False: 1.35k]
  ------------------
   44|      6|    return;
   45|      6|  }
   46|       |
   47|       |  // Pull a random slice of data for fuzzing
   48|  1.35k|  size_t take_len = fdp.ConsumeIntegralInRange<size_t>(0, fdp.remaining_bytes());
   49|  1.35k|  std::vector<uint8_t> input_bytes = fdp.ConsumeBytes<uint8_t>(take_len);
   50|       |
   51|       |  // Create 1 to 4 independent hashing contexts with it own digest buffer
   52|  1.35k|  const unsigned num_contexts = fdp.ConsumeIntegralInRange<unsigned>(1, 4);
   53|  1.35k|  std::vector<HashType> contexts(num_contexts);
   54|  1.35k|  std::vector<std::vector<uint8_t>> digests(num_contexts, std::vector<uint8_t>(digest_size));
   55|  4.35k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (55:24): [True: 3.00k, False: 1.35k]
  ------------------
   56|  3.00k|    init_once(&contexts[i]);
   57|  3.00k|  }
   58|       |
   59|       |  // Intentionally misalign the data pointer to stress alignment sensitive paths
   60|  1.35k|  const size_t misalign_pad = fdp.ConsumeIntegralInRange<size_t>(0, 64);
   61|  1.35k|  std::vector<uint8_t> scratch_buf(misalign_pad + input_bytes.size());
   62|  1.35k|  if (!input_bytes.empty()) {
  ------------------
  |  Branch (62:7): [True: 1.02k, False: 324]
  ------------------
   63|  1.02k|    memcpy(scratch_buf.data() + misalign_pad, input_bytes.data(), input_bytes.size());
   64|  1.02k|  }
   65|       |
   66|       |  // Define cursor and remaining bytes counter to keep track of the multiple hash update iterations
   67|  1.35k|  const uint8_t *cursor = scratch_buf.data() + misalign_pad;
   68|  1.35k|  size_t remaining = input_bytes.size();
   69|       |
   70|       |  // Perform multiple hash update iterations on the raw data
   71|  1.35k|  unsigned num_iterations = fdp.ConsumeIntegralInRange<unsigned>(1, 4);
   72|  3.62k|  while (num_iterations-- && remaining > 0) {
  ------------------
  |  Branch (72:10): [True: 2.94k, False: 677]
  |  Branch (72:30): [True: 2.27k, False: 675]
  ------------------
   73|       |    // Pick which context to feed this iteration
   74|  2.27k|    const unsigned ctx_index = (num_contexts == 1) ? 0 : fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  ------------------
  |  Branch (74:32): [True: 1.17k, False: 1.09k]
  ------------------
   75|       |
   76|       |    // Choose a chunking pattern relative to block size.
   77|  2.27k|    enum Pattern { LESS1, EQ, PLUS1, SMALL, RANDOM, TAIL, HALT };
   78|  2.27k|    Pattern pattern = fdp.PickValueInArray<Pattern>({LESS1, EQ, PLUS1, SMALL, RANDOM, TAIL, HALT});
   79|       |
   80|  2.27k|    size_t chunk_len = 0;
   81|  2.27k|    switch (pattern) {
  ------------------
  |  Branch (81:13): [True: 2.27k, False: 0]
  ------------------
   82|    497|      case LESS1: {
  ------------------
  |  Branch (82:7): [True: 497, False: 1.77k]
  ------------------
   83|       |        // Consume 1 byte less from block size from the raw data for this iteration
   84|    497|        if (block_size > 1) {
  ------------------
  |  Branch (84:13): [True: 497, False: 0]
  ------------------
   85|    497|          chunk_len = std::min(remaining, block_size - 1);
   86|    497|        }
   87|    497|        break;
   88|      0|      }
   89|    185|      case EQ: {
  ------------------
  |  Branch (89:7): [True: 185, False: 2.08k]
  ------------------
   90|       |        // Consume block size bytes from the raw data for this iteration
   91|    185|        chunk_len = std::min(remaining, block_size);
   92|    185|        break;
   93|      0|      }
   94|    170|      case PLUS1: {
  ------------------
  |  Branch (94:7): [True: 170, False: 2.10k]
  ------------------
   95|       |        // Consume 1 byte more from block size from the raw data for this iteration
   96|    170|        chunk_len = std::min(remaining, block_size + 1);
   97|    170|        break;
   98|      0|      }
   99|    510|      case SMALL: {
  ------------------
  |  Branch (99:7): [True: 510, False: 1.76k]
  ------------------
  100|       |        // Consume 1~32 bytes from the raw data for this iteration
  101|    510|        size_t small_len = (size_t)fdp.ConsumeIntegralInRange<int>(1, 32);
  102|    510|        chunk_len = std::min(remaining, small_len);
  103|    510|        break;
  104|      0|      }
  105|    357|      case RANDOM: {
  ------------------
  |  Branch (105:7): [True: 357, False: 1.91k]
  ------------------
  106|       |        // Consume random bytes from the raw data for this iteration
  107|    357|        chunk_len = (remaining >= 1) ? (size_t)fdp.ConsumeIntegralInRange<size_t>(1, remaining) : 0;
  ------------------
  |  Branch (107:21): [True: 357, False: 0]
  ------------------
  108|    357|        break;
  109|      0|      }
  110|     58|      case TAIL: {
  ------------------
  |  Branch (110:7): [True: 58, False: 2.21k]
  ------------------
  111|       |        // Consume all remaining bytes from the raw data for this iteration
  112|     58|        chunk_len = remaining;
  113|     58|        break;
  114|      0|      }
  115|    497|      case HALT: {
  ------------------
  |  Branch (115:7): [True: 497, False: 1.77k]
  ------------------
  116|       |        // Consume small chunk and consider reinitialisation or early halt of the hash iteration
  117|    497|        size_t step  = std::max<size_t>(1, fdp.ConsumeIntegralInRange<size_t>(1, block_size));
  118|    497|        size_t loops = fdp.ConsumeIntegralInRange<size_t>(1, 4);
  119|  1.36k|        for (size_t j = 0; j < loops && remaining > 0; j++) {
  ------------------
  |  Branch (119:28): [True: 947, False: 416]
  |  Branch (119:41): [True: 866, False: 81]
  ------------------
  120|    866|          size_t w = std::min(remaining, step);
  121|    866|          update_fn(&contexts[ctx_index], w, cursor);
  122|    866|          cursor += w;
  123|    866|          remaining -= w;
  124|    866|        }
  125|       |
  126|       |        // Randomly reinitialise the hash stream
  127|    497|        if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (127:13): [True: 212, False: 285]
  ------------------
  128|    212|          finish_fn(&contexts[ctx_index], digests[ctx_index].data());
  129|    212|        }
  130|    497|        continue;
  131|      0|      }
  132|  2.27k|    }
  133|       |
  134|  1.77k|    if (chunk_len == 0 || chunk_len > remaining) {
  ------------------
  |  Branch (134:9): [True: 0, False: 1.77k]
  |  Branch (134:27): [True: 0, False: 1.77k]
  ------------------
  135|      0|      continue;
  136|      0|    }
  137|       |
  138|       |    // Fuzz the update function
  139|  1.77k|    update_fn(&contexts[ctx_index], chunk_len, cursor);
  140|  1.77k|    cursor += chunk_len;
  141|  1.77k|    remaining -= chunk_len;
  142|  1.77k|  }
  143|       |
  144|       |  // Finalize all active contexts (finish_reset).
  145|  4.35k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (145:24): [True: 3.00k, False: 1.35k]
  ------------------
  146|  3.00k|    finish_fn(&contexts[i], digests[i].data());
  147|  3.00k|  }
  148|       |
  149|       |  // Additional fuzzing on special context chaining approach.
  150|  1.35k|  if (num_contexts >= 2 && digest_size && fdp.ConsumeBool()) {
  ------------------
  |  Branch (150:7): [True: 687, False: 665]
  |  Branch (150:28): [True: 687, False: 0]
  |  Branch (150:43): [True: 468, False: 219]
  ------------------
  151|    468|    unsigned src_idx = fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  152|    468|    unsigned dst_idx = fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  153|    468|    if (src_idx != dst_idx) {
  ------------------
  |  Branch (153:9): [True: 232, False: 236]
  ------------------
  154|    232|      size_t offset = fdp.ConsumeIntegralInRange<size_t>(0, digest_size - 1);
  155|    232|      size_t max_avail = digest_size - offset; // >= 1
  156|    232|      size_t feed_len = fdp.ConsumeIntegralInRange<size_t>(1, max_avail);
  157|    232|      update_fn(&contexts[dst_idx], feed_len, digests[src_idx].data() + offset);
  158|    232|      finish_fn(&contexts[dst_idx], digests[dst_idx].data());
  159|    232|    }
  160|    468|  }
  161|       |
  162|       |  // Deinitialise all contexts after this iteration
  163|  4.35k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (163:24): [True: 3.00k, False: 1.35k]
  ------------------
  164|  3.00k|    deinit_fn(&contexts[i]);
  165|  3.00k|  }
  166|  1.35k|}
fuzz_crypto_ext.cpp:_ZL19fuzz_hash_ext_multiI16mhd_Sha256CtxExtEvR18FuzzedDataProvidermPFvPT_EPFvS4_mPKhEPFvS4_PhES6_m:
   42|  1.24k|                                size_t digest_size) {
   43|  1.24k|  if (!fdp.remaining_bytes()) {
  ------------------
  |  Branch (43:7): [True: 23, False: 1.22k]
  ------------------
   44|     23|    return;
   45|     23|  }
   46|       |
   47|       |  // Pull a random slice of data for fuzzing
   48|  1.22k|  size_t take_len = fdp.ConsumeIntegralInRange<size_t>(0, fdp.remaining_bytes());
   49|  1.22k|  std::vector<uint8_t> input_bytes = fdp.ConsumeBytes<uint8_t>(take_len);
   50|       |
   51|       |  // Create 1 to 4 independent hashing contexts with it own digest buffer
   52|  1.22k|  const unsigned num_contexts = fdp.ConsumeIntegralInRange<unsigned>(1, 4);
   53|  1.22k|  std::vector<HashType> contexts(num_contexts);
   54|  1.22k|  std::vector<std::vector<uint8_t>> digests(num_contexts, std::vector<uint8_t>(digest_size));
   55|  3.59k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (55:24): [True: 2.37k, False: 1.22k]
  ------------------
   56|  2.37k|    init_once(&contexts[i]);
   57|  2.37k|  }
   58|       |
   59|       |  // Intentionally misalign the data pointer to stress alignment sensitive paths
   60|  1.22k|  const size_t misalign_pad = fdp.ConsumeIntegralInRange<size_t>(0, 64);
   61|  1.22k|  std::vector<uint8_t> scratch_buf(misalign_pad + input_bytes.size());
   62|  1.22k|  if (!input_bytes.empty()) {
  ------------------
  |  Branch (62:7): [True: 846, False: 378]
  ------------------
   63|    846|    memcpy(scratch_buf.data() + misalign_pad, input_bytes.data(), input_bytes.size());
   64|    846|  }
   65|       |
   66|       |  // Define cursor and remaining bytes counter to keep track of the multiple hash update iterations
   67|  1.22k|  const uint8_t *cursor = scratch_buf.data() + misalign_pad;
   68|  1.22k|  size_t remaining = input_bytes.size();
   69|       |
   70|       |  // Perform multiple hash update iterations on the raw data
   71|  1.22k|  unsigned num_iterations = fdp.ConsumeIntegralInRange<unsigned>(1, 4);
   72|  2.98k|  while (num_iterations-- && remaining > 0) {
  ------------------
  |  Branch (72:10): [True: 2.42k, False: 559]
  |  Branch (72:30): [True: 1.75k, False: 665]
  ------------------
   73|       |    // Pick which context to feed this iteration
   74|  1.75k|    const unsigned ctx_index = (num_contexts == 1) ? 0 : fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  ------------------
  |  Branch (74:32): [True: 1.16k, False: 595]
  ------------------
   75|       |
   76|       |    // Choose a chunking pattern relative to block size.
   77|  1.75k|    enum Pattern { LESS1, EQ, PLUS1, SMALL, RANDOM, TAIL, HALT };
   78|  1.75k|    Pattern pattern = fdp.PickValueInArray<Pattern>({LESS1, EQ, PLUS1, SMALL, RANDOM, TAIL, HALT});
   79|       |
   80|  1.75k|    size_t chunk_len = 0;
   81|  1.75k|    switch (pattern) {
  ------------------
  |  Branch (81:13): [True: 1.75k, False: 0]
  ------------------
   82|    465|      case LESS1: {
  ------------------
  |  Branch (82:7): [True: 465, False: 1.29k]
  ------------------
   83|       |        // Consume 1 byte less from block size from the raw data for this iteration
   84|    465|        if (block_size > 1) {
  ------------------
  |  Branch (84:13): [True: 465, False: 0]
  ------------------
   85|    465|          chunk_len = std::min(remaining, block_size - 1);
   86|    465|        }
   87|    465|        break;
   88|      0|      }
   89|     96|      case EQ: {
  ------------------
  |  Branch (89:7): [True: 96, False: 1.66k]
  ------------------
   90|       |        // Consume block size bytes from the raw data for this iteration
   91|     96|        chunk_len = std::min(remaining, block_size);
   92|     96|        break;
   93|      0|      }
   94|     98|      case PLUS1: {
  ------------------
  |  Branch (94:7): [True: 98, False: 1.66k]
  ------------------
   95|       |        // Consume 1 byte more from block size from the raw data for this iteration
   96|     98|        chunk_len = std::min(remaining, block_size + 1);
   97|     98|        break;
   98|      0|      }
   99|    276|      case SMALL: {
  ------------------
  |  Branch (99:7): [True: 276, False: 1.48k]
  ------------------
  100|       |        // Consume 1~32 bytes from the raw data for this iteration
  101|    276|        size_t small_len = (size_t)fdp.ConsumeIntegralInRange<int>(1, 32);
  102|    276|        chunk_len = std::min(remaining, small_len);
  103|    276|        break;
  104|      0|      }
  105|    278|      case RANDOM: {
  ------------------
  |  Branch (105:7): [True: 278, False: 1.48k]
  ------------------
  106|       |        // Consume random bytes from the raw data for this iteration
  107|    278|        chunk_len = (remaining >= 1) ? (size_t)fdp.ConsumeIntegralInRange<size_t>(1, remaining) : 0;
  ------------------
  |  Branch (107:21): [True: 278, False: 0]
  ------------------
  108|    278|        break;
  109|      0|      }
  110|     51|      case TAIL: {
  ------------------
  |  Branch (110:7): [True: 51, False: 1.70k]
  ------------------
  111|       |        // Consume all remaining bytes from the raw data for this iteration
  112|     51|        chunk_len = remaining;
  113|     51|        break;
  114|      0|      }
  115|    495|      case HALT: {
  ------------------
  |  Branch (115:7): [True: 495, False: 1.26k]
  ------------------
  116|       |        // Consume small chunk and consider reinitialisation or early halt of the hash iteration
  117|    495|        size_t step  = std::max<size_t>(1, fdp.ConsumeIntegralInRange<size_t>(1, block_size));
  118|    495|        size_t loops = fdp.ConsumeIntegralInRange<size_t>(1, 4);
  119|  1.26k|        for (size_t j = 0; j < loops && remaining > 0; j++) {
  ------------------
  |  Branch (119:28): [True: 877, False: 390]
  |  Branch (119:41): [True: 772, False: 105]
  ------------------
  120|    772|          size_t w = std::min(remaining, step);
  121|    772|          update_fn(&contexts[ctx_index], w, cursor);
  122|    772|          cursor += w;
  123|    772|          remaining -= w;
  124|    772|        }
  125|       |
  126|       |        // Randomly reinitialise the hash stream
  127|    495|        if (fdp.ConsumeBool()) {
  ------------------
  |  Branch (127:13): [True: 199, False: 296]
  ------------------
  128|    199|          finish_fn(&contexts[ctx_index], digests[ctx_index].data());
  129|    199|        }
  130|    495|        continue;
  131|      0|      }
  132|  1.75k|    }
  133|       |
  134|  1.26k|    if (chunk_len == 0 || chunk_len > remaining) {
  ------------------
  |  Branch (134:9): [True: 0, False: 1.26k]
  |  Branch (134:27): [True: 0, False: 1.26k]
  ------------------
  135|      0|      continue;
  136|      0|    }
  137|       |
  138|       |    // Fuzz the update function
  139|  1.26k|    update_fn(&contexts[ctx_index], chunk_len, cursor);
  140|  1.26k|    cursor += chunk_len;
  141|  1.26k|    remaining -= chunk_len;
  142|  1.26k|  }
  143|       |
  144|       |  // Finalize all active contexts (finish_reset).
  145|  3.59k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (145:24): [True: 2.37k, False: 1.22k]
  ------------------
  146|  2.37k|    finish_fn(&contexts[i], digests[i].data());
  147|  2.37k|  }
  148|       |
  149|       |  // Additional fuzzing on special context chaining approach.
  150|  1.22k|  if (num_contexts >= 2 && digest_size && fdp.ConsumeBool()) {
  ------------------
  |  Branch (150:7): [True: 536, False: 688]
  |  Branch (150:28): [True: 536, False: 0]
  |  Branch (150:43): [True: 291, False: 245]
  ------------------
  151|    291|    unsigned src_idx = fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  152|    291|    unsigned dst_idx = fdp.ConsumeIntegralInRange<unsigned>(0, num_contexts - 1);
  153|    291|    if (src_idx != dst_idx) {
  ------------------
  |  Branch (153:9): [True: 192, False: 99]
  ------------------
  154|    192|      size_t offset = fdp.ConsumeIntegralInRange<size_t>(0, digest_size - 1);
  155|    192|      size_t max_avail = digest_size - offset; // >= 1
  156|    192|      size_t feed_len = fdp.ConsumeIntegralInRange<size_t>(1, max_avail);
  157|    192|      update_fn(&contexts[dst_idx], feed_len, digests[src_idx].data() + offset);
  158|    192|      finish_fn(&contexts[dst_idx], digests[dst_idx].data());
  159|    192|    }
  160|    291|  }
  161|       |
  162|       |  // Deinitialise all contexts after this iteration
  163|  3.59k|  for (unsigned i = 0; i < num_contexts; i++) {
  ------------------
  |  Branch (163:24): [True: 2.37k, False: 1.22k]
  ------------------
  164|  2.37k|    deinit_fn(&contexts[i]);
  165|  2.37k|  }
  166|  1.22k|}

_Z21mhd_MD5_init_one_timeP13mhd_Md5CtxExt:
   60|  3.00k|{
   61|  3.00k|  ctx->handle = NULL;
   62|  3.00k|  ctx->ext_error = gnutls_hash_init (&ctx->handle,
   63|  3.00k|                                     GNUTLS_DIG_MD5);
   64|  3.00k|  if ((0 != ctx->ext_error) && (NULL != ctx->handle))
  ------------------
  |  Branch (64:7): [True: 0, False: 3.00k]
  |  Branch (64:32): [True: 0, False: 0]
  ------------------
   65|      0|  {
   66|       |    /* GnuTLS may return initialisation error and set the handle at the
   67|       |       same time. Such handle cannot be used for calculations.
   68|       |       Note: GnuTLS may also return an error and NOT set the handle. */
   69|      0|    mhd_MD5_deinit (ctx);
   70|      0|  }
   71|       |
   72|       |  /* If handle is NULL, the error must be set */
   73|  3.00k|  mhd_assert ((NULL != ctx->handle) || (0 != ctx->ext_error));
  ------------------
  |  |   66|  3.00k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   74|       |  /* If error is set, the handle must be NULL */
   75|  3.00k|  mhd_assert ((0 == ctx->ext_error) || (NULL == ctx->handle));
  ------------------
  |  |   66|  3.00k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   76|  3.00k|}
_Z14mhd_MD5_updateP13mhd_Md5CtxExtmPKh:
   90|  2.87k|{
   91|  2.87k|  mhd_assert (0 != size);
  ------------------
  |  |   66|  2.87k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   92|  2.87k|  if (0 == ctx->ext_error)
  ------------------
  |  Branch (92:7): [True: 2.87k, False: 0]
  ------------------
   93|  2.87k|    ctx->ext_error = gnutls_hash (ctx->handle,
   94|  2.87k|                                  data,
   95|  2.87k|                                  size);
   96|  2.87k|}
_Z20mhd_MD5_finish_resetP13mhd_Md5CtxExtPh:
  108|  3.44k|{
  109|  3.44k|  if (0 == ctx->ext_error)
  ------------------
  |  Branch (109:7): [True: 3.44k, False: 0]
  ------------------
  110|  3.44k|    gnutls_hash_output (ctx->handle,
  111|  3.44k|                        digest);
  112|  3.44k|}
_Z14mhd_MD5_deinitP13mhd_Md5CtxExt:
  122|  3.00k|{
  123|  3.00k|  if (NULL != ctx->handle)
  ------------------
  |  Branch (123:7): [True: 3.00k, False: 0]
  ------------------
  124|  3.00k|  {
  125|  3.00k|    gnutls_hash_deinit (ctx->handle,
  126|  3.00k|                        NULL);
  127|       |    ctx->handle = NULL;
  128|  3.00k|  }
  129|  3.00k|}

_Z24mhd_SHA256_init_one_timeP16mhd_Sha256CtxExt:
   59|  2.37k|{
   60|  2.37k|  ctx->handle = NULL;
   61|  2.37k|  ctx->ext_error = gnutls_hash_init (&ctx->handle,
   62|  2.37k|                                     GNUTLS_DIG_SHA256);
   63|  2.37k|  if ((0 != ctx->ext_error)
  ------------------
  |  Branch (63:7): [True: 0, False: 2.37k]
  ------------------
   64|      0|      && (NULL != ctx->handle))
  ------------------
  |  Branch (64:10): [True: 0, False: 0]
  ------------------
   65|      0|  {
   66|       |    /* GnuTLS may return initialisation error and set the handle at the
   67|       |       same time. Such handle cannot be used for calculations.
   68|       |       Note: GnuTLS may also return an error and NOT set the handle. */
   69|      0|    gnutls_free (ctx->handle);
   70|      0|    ctx->handle = NULL;
   71|      0|  }
   72|       |
   73|       |  /* If handle is NULL, the error must be set */
   74|  2.37k|  mhd_assert ((NULL != ctx->handle) || (0 != ctx->ext_error));
  ------------------
  |  |   66|  2.37k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   75|       |  /* If error is set, the handle must be NULL */
   76|  2.37k|  mhd_assert ((0 == ctx->ext_error) || (NULL == ctx->handle));
  ------------------
  |  |   66|  2.37k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   77|  2.37k|}
_Z17mhd_SHA256_updateP16mhd_Sha256CtxExtmPKh:
   91|  2.22k|{
   92|  2.22k|  mhd_assert (0 != size);
  ------------------
  |  |   66|  2.22k|#  define mhd_assert(ignore) ((void) 0)
  ------------------
   93|       |
   94|  2.22k|  if (0 == ctx->ext_error)
  ------------------
  |  Branch (94:7): [True: 2.22k, False: 0]
  ------------------
   95|  2.22k|    ctx->ext_error = gnutls_hash (ctx->handle,
   96|  2.22k|                                  data,
   97|  2.22k|                                  size);
   98|  2.22k|}
_Z23mhd_SHA256_finish_resetP16mhd_Sha256CtxExtPh:
  110|  2.76k|{
  111|  2.76k|  if (0 == ctx->ext_error)
  ------------------
  |  Branch (111:7): [True: 2.76k, False: 0]
  ------------------
  112|  2.76k|    gnutls_hash_output (ctx->handle,
  113|  2.76k|                        digest);
  114|  2.76k|}
_Z17mhd_SHA256_deinitP16mhd_Sha256CtxExt:
  124|  2.37k|{
  125|  2.37k|  if (NULL != ctx->handle)
  ------------------
  |  Branch (125:7): [True: 2.37k, False: 0]
  ------------------
  126|  2.37k|  {
  127|  2.37k|    gnutls_hash_deinit (ctx->handle,
  128|  2.37k|                        NULL);
  129|       |    ctx->handle = NULL;
  130|  2.37k|  }
  131|  2.37k|}

